home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / Borland Visual dBASE Professiona v7.0 / DATA1.CAB / Sample_Include / Winuser.h < prev   
Encoding:
C/C++ Source or Header  |  1997-11-20  |  79.5 KB  |  2,549 lines

  1. //--------------------------------------------------------------
  2. //
  3. //  WINUSER.H
  4. //
  5. //  This file contains Windows API type and constant
  6. //  declarations for calls to the Win32 API from Visual 
  7. //  dBASE. Function prototypes are in WIN32API.PRG.
  8. //
  9. // 
  10. //  Visual dBASE Samples Group
  11. //
  12. //  $Revision:   1.2  $
  13. //
  14. //  Portions copyright (c) 1991-1995, Microsoft Corp. 
  15. //
  16. //--------------------------------------------------------------
  17.  
  18. #ifndef WINUSER_H
  19. #define WINUSER_H
  20.  
  21. #include <WINDEF.H>
  22.  
  23. //
  24. //  winuser.h 
  25. //  USER constant definitions and macros
  26. //
  27.  
  28. //
  29. // Define API decoration for direct importing of DLL references.
  30. //
  31.  
  32. // TYPES
  33.  
  34. #define HDWP HANDLE
  35. #define MENUTEMPLATE VOID
  36. #define LPMENUTEMPLATE PVOID
  37.  
  38. //
  39. // Predefined Resource Types
  40. //
  41.  
  42. #define RT_CURSOR           (1)
  43. #define RT_BITMAP           (2)
  44. #define RT_ICON             (3)
  45. #define RT_MENU             (4)
  46. #define RT_DIALOG           (5)
  47. #define RT_STRING           (6)
  48. #define RT_FONTDIR          (7)
  49. #define RT_FONT             (8)
  50. #define RT_ACCELERATOR      (9)
  51. #define RT_RCDATA           (10)
  52. #define RT_MESSAGETABLE     (11)
  53.  
  54. // #define DIFFERENCE          11    // Conflicts with Visual dBASE function
  55. #define RT_GROUP_CURSOR     (RT_CURSOR + 11)   // DIFFERENCE
  56. #define RT_GROUP_ICON       (RT_ICON + 11)  // DIFFERENCE
  57. #define RT_VERSION          (16)
  58. #define RT_DLGINCLUDE       (17)
  59. #define RT_PLUGPLAY         (19)
  60. #define RT_VXD              (20)
  61.  
  62. //
  63. // Scroll Bar Constants
  64. //
  65. #define SB_HORZ             0
  66. #define SB_VERT             1
  67. #define SB_CTL              2
  68. #define SB_BOTH             3
  69.  
  70. //
  71. // Scroll Bar Commands
  72. //
  73. #define SB_LINEUP           0
  74. #define SB_LINELEFT         0
  75. #define SB_LINEDOWN         1
  76. #define SB_LINERIGHT        1
  77. #define SB_PAGEUP           2
  78. #define SB_PAGELEFT         2
  79. #define SB_PAGEDOWN         3
  80. #define SB_PAGERIGHT        3
  81. #define SB_THUMBPOSITION    4
  82. #define SB_THUMBTRACK       5
  83. #define SB_TOP              6
  84. #define SB_LEFT             6
  85. #define SB_BOTTOM           7
  86. #define SB_RIGHT            7
  87. #define SB_ENDSCROLL        8
  88.  
  89. //
  90. // ShowWindow() Commands
  91. //
  92. #define SW_HIDE             0
  93. #define SW_SHOWNORMAL       1
  94. #define SW_NORMAL           1
  95. #define SW_SHOWMINIMIZED    2
  96. #define SW_SHOWMAXIMIZED    3
  97. #define SW_MAXIMIZE         3
  98. #define SW_SHOWNOACTIVATE   4
  99. #define SW_SHOW             5
  100. #define SW_MINIMIZE         6
  101. #define SW_SHOWMINNOACTIVE  7
  102. #define SW_SHOWNA           8
  103. #define SW_RESTORE          9
  104. #define SW_SHOWDEFAULT      10
  105. #define SW_MAX              10
  106.  
  107. //
  108. // Old ShowWindow() Commands
  109. //
  110. #define HIDE_WINDOW         0
  111. #define SHOW_OPENWINDOW     1
  112. #define SHOW_ICONWINDOW     2
  113. #define SHOW_FULLSCREEN     3
  114. #define SHOW_OPENNOACTIVATE 4
  115.  
  116. #ifndef WIN32API_NOMESSAGE
  117.  
  118. //
  119. // Identifiers for the WM_SHOWWINDOW message
  120. //
  121. #define SW_PARENTCLOSING    1
  122. #define SW_OTHERZOOM        2
  123. #define SW_PARENTOPENING    3
  124. #define SW_OTHERUNZOOM      4
  125.  
  126. //
  127. // WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags
  128. //
  129. #define KF_EXTENDED         0x0100
  130. #define KF_DLGMODE          0x0800
  131. #define KF_MENUMODE         0x1000
  132. #define KF_ALTDOWN          0x2000
  133. #define KF_REPEAT           0x4000
  134. #define KF_UP               0x8000
  135.  
  136. //
  137. // Virtual Keys, Standard Set
  138. //
  139. #define VK_LBUTTON        0x01
  140. #define VK_RBUTTON        0x02
  141. #define VK_CANCEL         0x03
  142. #define VK_MBUTTON        0x04    /* NOT contiguous with L & RBUTTON */
  143.  
  144. #define VK_BACK           0x08
  145. #define VK_TAB            0x09
  146.  
  147. #define VK_CLEAR          0x0C
  148. #define VK_RETURN         0x0D
  149.  
  150. #define VK_SHIFT          0x10
  151. #define VK_CONTROL        0x11
  152. #define VK_MENU           0x12
  153. #define VK_PAUSE          0x13
  154. #define VK_CAPITAL        0x14
  155.  
  156. #define VK_ESCAPE         0x1B
  157.  
  158. #define VK_SPACE          0x20
  159. #define VK_PRIOR          0x21
  160. #define VK_NEXT           0x22
  161. #define VK_END            0x23
  162. #define VK_HOME           0x24
  163. #define VK_LEFT           0x25
  164. #define VK_UP             0x26
  165. #define VK_RIGHT          0x27
  166. #define VK_DOWN           0x28
  167. #define VK_SELECT         0x29
  168. #define VK_PRINT          0x2A
  169. #define VK_EXECUTE        0x2B
  170. #define VK_SNAPSHOT       0x2C
  171. #define VK_INSERT         0x2D
  172. #define VK_DELETE         0x2E
  173. #define VK_HELP           0x2F
  174.  
  175. // VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39)
  176. // VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A)
  177.  
  178. #define VK_LWIN           0x5B
  179. #define VK_RWIN           0x5C
  180. #define VK_APPS           0x5D
  181.  
  182. #define VK_NUMPAD0        0x60
  183. #define VK_NUMPAD1        0x61
  184. #define VK_NUMPAD2        0x62
  185. #define VK_NUMPAD3        0x63
  186. #define VK_NUMPAD4        0x64
  187. #define VK_NUMPAD5        0x65
  188. #define VK_NUMPAD6        0x66
  189. #define VK_NUMPAD7        0x67
  190. #define VK_NUMPAD8        0x68
  191. #define VK_NUMPAD9        0x69
  192. #define VK_MULTIPLY       0x6A
  193. #define VK_ADD            0x6B
  194. #define VK_SEPARATOR      0x6C
  195. #define VK_SUBTRACT       0x6D
  196. #define VK_DECIMAL        0x6E
  197. #define VK_DIVIDE         0x6F
  198. #define VK_F1             0x70
  199. #define VK_F2             0x71
  200. #define VK_F3             0x72
  201. #define VK_F4             0x73
  202. #define VK_F5             0x74
  203. #define VK_F6             0x75
  204. #define VK_F7             0x76
  205. #define VK_F8             0x77
  206. #define VK_F9             0x78
  207. #define VK_F10            0x79
  208. #define VK_F11            0x7A
  209. #define VK_F12            0x7B
  210. #define VK_F13            0x7C
  211. #define VK_F14            0x7D
  212. #define VK_F15            0x7E
  213. #define VK_F16            0x7F
  214. #define VK_F17            0x80
  215. #define VK_F18            0x81
  216. #define VK_F19            0x82
  217. #define VK_F20            0x83
  218. #define VK_F21            0x84
  219. #define VK_F22            0x85
  220. #define VK_F23            0x86
  221. #define VK_F24            0x87
  222.  
  223. #define VK_NUMLOCK        0x90
  224. #define VK_SCROLL         0x91
  225.  
  226. //
  227. // VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
  228. // Used only as parameters to GetAsyncKeyState() and GetKeyState().
  229. // No other API or message will distinguish left and right keys in this way.
  230. //
  231. #define VK_LSHIFT         0xA0
  232. #define VK_RSHIFT         0xA1
  233. #define VK_LCONTROL       0xA2
  234. #define VK_RCONTROL       0xA3
  235. #define VK_LMENU          0xA4
  236. #define VK_RMENU          0xA5
  237. #define VK_PROCESSKEY     0xE5
  238.  
  239. #define VK_ATTN           0xF6
  240. #define VK_CRSEL          0xF7
  241. #define VK_EXSEL          0xF8
  242. #define VK_EREOF          0xF9
  243. #define VK_PLAY           0xFA
  244. #define VK_ZOOM           0xFB
  245. #define VK_NONAME         0xFC
  246. #define VK_PA1            0xFD
  247. #define VK_OEM_CLEAR      0xFE
  248.  
  249. #endif // WIN32API_NOMESSAGES
  250.  
  251. //
  252. // SetWindowsHook() codes
  253. //
  254. #define WH_MIN              (-1)
  255. #define WH_MSGFILTER        (-1)
  256. #define WH_JOURNALRECORD    0
  257. #define WH_JOURNALPLAYBACK  1
  258. #define WH_KEYBOARD         2
  259. #define WH_GETMESSAGE       3
  260. #define WH_CALLWNDPROC      4
  261. #define WH_CBT              5
  262. #define WH_SYSMSGFILTER     6
  263. #define WH_MOUSE            7
  264. #define WH_HARDWARE         8
  265. #define WH_DEBUG            9
  266. #define WH_SHELL           10
  267. #define WH_FOREGROUNDIDLE  11
  268. #define WH_CALLWNDPROCRET  12
  269. #define WH_MAX             12
  270. #define WH_MINHOOK         WH_MIN
  271. #define WH_MAXHOOK         WH_MAX
  272.  
  273. //
  274. // Hook Codes
  275. //
  276. #define HC_ACTION           0
  277. #define HC_GETNEXT          1
  278. #define HC_SKIP             2
  279. #define HC_NOREMOVE         3
  280. #define HC_NOREM            HC_NOREMOVE
  281. #define HC_SYSMODALON       4
  282. #define HC_SYSMODALOFF      5
  283.  
  284. //
  285. // CBT Hook Codes
  286. //
  287. #define HCBT_MOVESIZE       0
  288. #define HCBT_MINMAX         1
  289. #define HCBT_QS             2
  290. #define HCBT_CREATEWND      3
  291. #define HCBT_DESTROYWND     4
  292. #define HCBT_ACTIVATE       5
  293. #define HCBT_CLICKSKIPPED   6
  294. #define HCBT_KEYSKIPPED     7
  295. #define HCBT_SYSCOMMAND     8
  296. #define HCBT_SETFOCUS       9
  297.  
  298. //
  299. // WH_MSGFILTER Filter Proc Codes
  300. //
  301. #define MSGF_DIALOGBOX      0
  302. #define MSGF_MESSAGEBOX     1
  303. #define MSGF_MENU           2
  304. #define MSGF_MOVE           3
  305. #define MSGF_SIZE           4
  306. #define MSGF_SCROLLBAR      5
  307. #define MSGF_NEXTWINDOW     6
  308. #define MSGF_MAINLOOP       8
  309. #define MSGF_MAX            8
  310. #define MSGF_USER           4096
  311.  
  312. //
  313. // Shell support
  314. //
  315. #define HSHELL_WINDOWCREATED        1
  316. #define HSHELL_WINDOWDESTROYED      2
  317. #define HSHELL_ACTIVATESHELLWINDOW  3
  318.  
  319. #define HSHELL_WINDOWACTIVATED      4
  320. #define HSHELL_GETMINRECT           5
  321. #define HSHELL_REDRAW               6
  322. #define HSHELL_TASKMAN              7
  323. #define HSHELL_LANGUAGE             8
  324.  
  325. //
  326. // Keyboard Layout API
  327. //
  328. #define HKL_PREV            0
  329. #define HKL_NEXT            1
  330.  
  331. #define KLF_ACTIVATE        0x00000001
  332. #define KLF_SUBSTITUTE_OK   0x00000002
  333. #define KLF_UNLOADPREVIOUS  0x00000004
  334. #define KLF_REORDER         0x00000008
  335. #define KLF_REPLACELANG     0x00000010
  336. #define KLF_NOTELLSHELL     0x00000080
  337.  
  338. //
  339. // Size of KeyboardLayoutName (number of characters), including nul terminator
  340. //
  341. #define KL_NAMELENGTH       9
  342.  
  343. //
  344. // Desktop-specific access flags
  345. //
  346. #define DESKTOP_READOBJECTS         0x0001
  347. #define DESKTOP_CREATEWINDOW        0x0002
  348. #define DESKTOP_CREATEMENU          0x0004
  349. #define DESKTOP_HOOKCONTROL         0x0008
  350. #define DESKTOP_JOURNALRECORD       0x0010
  351. #define DESKTOP_JOURNALPLAYBACK     0x0020
  352. #define DESKTOP_ENUMERATE           0x0040
  353. #define DESKTOP_WRITEOBJECTS        0x0080
  354. #define DESKTOP_SWITCHDESKTOP       0x0100
  355.  
  356. //
  357. // Desktop-specific control flags
  358. //
  359. #define DF_ALLOWOTHERACCOUNTHOOK    0x0001
  360.  
  361. //
  362. // Windowstation-specific access flags
  363. //
  364. #define WINSTA_ENUMDESKTOPS         0x0001
  365. #define WINSTA_READATTRIBUTES       0x0002
  366. #define WINSTA_ACCESSCLIPBOARD      0x0004
  367. #define WINSTA_CREATEDESKTOP        0x0008
  368. #define WINSTA_WRITEATTRIBUTES      0x0010
  369. #define WINSTA_ACCESSGLOBALATOMS    0x0020
  370. #define WINSTA_EXITWINDOWS          0x0040
  371. #define WINSTA_ENUMERATE            0x0100
  372. #define WINSTA_READSCREEN           0x0200
  373.  
  374. //
  375. // Windowstation-specific attribute flags
  376. //
  377. #define WSF_VISIBLE                 0x0001
  378.  
  379. #define UOI_FLAGS       1
  380. #define UOI_NAME        2
  381. #define UOI_TYPE        3
  382.  
  383. //
  384. // Window field offsets for GetWindowLong()
  385. //
  386. #define GWL_WNDPROC         (-4)
  387. #define GWL_HINSTANCE       (-6)
  388. #define GWL_HWNDPARENT      (-8)
  389. #define GWL_STYLE           (-16)
  390. #define GWL_EXSTYLE         (-20)
  391. #define GWL_USERDATA        (-21)
  392. #define GWL_ID              (-12)
  393.  
  394. //
  395. // Class field offsets for GetClassLong()
  396. //
  397. #define GCL_MENUNAME        (-8)
  398. #define GCL_HBRBACKGROUND   (-10)
  399. #define GCL_HCURSOR         (-12)
  400. #define GCL_HICON           (-14)
  401. #define GCL_HMODULE         (-16)
  402. #define GCL_CBWNDEXTRA      (-18)
  403. #define GCL_CBCLSEXTRA      (-20)
  404. #define GCL_WNDPROC         (-24)
  405. #define GCL_STYLE           (-26)
  406. #define GCW_ATOM            (-32)
  407. #define GCL_HICONSM         (-34)
  408.  
  409. #ifndef WIN32API_NOMESSAGES
  410.  
  411. //
  412. // Window Messages
  413. //
  414.  
  415. #define WM_NULL                         0x0000
  416. #define WM_CREATE                       0x0001
  417. #define WM_DESTROY                      0x0002
  418. #define WM_MOVE                         0x0003
  419. #define WM_SIZE                         0x0005
  420. #define WM_ACTIVATE                     0x0006
  421.  
  422. //
  423. // WM_ACTIVATE state values
  424. //
  425. #define     WA_INACTIVE     0
  426. #define     WA_ACTIVE       1
  427. #define     WA_CLICKACTIVE  2
  428.  
  429. #define WM_SETFOCUS                     0x0007
  430. #define WM_KILLFOCUS                    0x0008
  431. #define WM_ENABLE                       0x000A
  432. #define WM_SETREDRAW                    0x000B
  433. #define WM_SETTEXT                      0x000C
  434. #define WM_GETTEXT                      0x000D
  435. #define WM_GETTEXTLENGTH                0x000E
  436. #define WM_PAINT                        0x000F
  437. #define WM_CLOSE                        0x0010
  438. #define WM_QUERYENDSESSION              0x0011
  439. #define WM_QUIT                         0x0012
  440. #define WM_QUERYOPEN                    0x0013
  441. #define WM_ERASEBKGND                   0x0014
  442. #define WM_SYSCOLORCHANGE               0x0015
  443. #define WM_ENDSESSION                   0x0016
  444. #define WM_SHOWWINDOW                   0x0018
  445. #define WM_WININICHANGE                 0x001A
  446. #define WM_SETTINGCHANGE                WM_WININICHANGE
  447.  
  448. #define WM_DEVMODECHANGE                0x001B
  449. #define WM_ACTIVATEAPP                  0x001C
  450. #define WM_FONTCHANGE                   0x001D
  451. #define WM_TIMECHANGE                   0x001E
  452. #define WM_CANCELMODE                   0x001F
  453. #define WM_SETCURSOR                    0x0020
  454. #define WM_MOUSEACTIVATE                0x0021
  455. #define WM_CHILDACTIVATE                0x0022
  456. #define WM_QUEUESYNC                    0x0023
  457.  
  458. #define WM_GETMINMAXINFO                0x0024
  459.  
  460. #define WM_PAINTICON                    0x0026
  461. #define WM_ICONERASEBKGND               0x0027
  462. #define WM_NEXTDLGCTL                   0x0028
  463. #define WM_SPOOLERSTATUS                0x002A
  464. #define WM_DRAWITEM                     0x002B
  465. #define WM_MEASUREITEM                  0x002C
  466. #define WM_DELETEITEM                   0x002D
  467. #define WM_VKEYTOITEM                   0x002E
  468. #define WM_CHARTOITEM                   0x002F
  469. #define WM_SETFONT                      0x0030
  470. #define WM_GETFONT                      0x0031
  471. #define WM_SETHOTKEY                    0x0032
  472. #define WM_GETHOTKEY                    0x0033
  473. #define WM_QUERYDRAGICON                0x0037
  474. #define WM_COMPAREITEM                  0x0039
  475.  
  476. #define WM_COMPACTING                   0x0041
  477. #define WM_COMMNOTIFY                   0x0044  /* no longer suported */
  478. #define WM_WINDOWPOSCHANGING            0x0046
  479. #define WM_WINDOWPOSCHANGED             0x0047
  480.  
  481. #define WM_POWER                        0x0048
  482. //
  483. // wParam for WM_POWER window message and DRV_POWER driver notification
  484. //
  485. #define PWR_OK              1
  486. #define PWR_FAIL            (-1)
  487. #define PWR_SUSPENDREQUEST  1
  488. #define PWR_SUSPENDRESUME   2
  489. #define PWR_CRITICALRESUME  3
  490.  
  491. #define WM_COPYDATA                     0x004A
  492. #define WM_CANCELJOURNAL                0x004B
  493.  
  494. #define WM_NOTIFY                       0x004E
  495. #define WM_INPUTLANGCHANGEREQUEST       0x0050
  496. #define WM_INPUTLANGCHANGE              0x0051
  497. #define WM_TCARD                        0x0052
  498. #define WM_HELP                         0x0053
  499. #define WM_USERCHANGED                  0x0054
  500. #define WM_NOTIFYFORMAT                 0x0055
  501.  
  502. #define NFR_ANSI                             1
  503. #define NFR_UNICODE                          2
  504. #define NF_QUERY                             3
  505. #define NF_REQUERY                           4
  506.  
  507. #define WM_CONTEXTMENU                  0x007B
  508. #define WM_STYLECHANGING                0x007C
  509. #define WM_STYLECHANGED                 0x007D
  510. #define WM_DISPLAYCHANGE                0x007E
  511. #define WM_GETICON                      0x007F
  512. #define WM_SETICON                      0x0080
  513.  
  514. #define WM_NCCREATE                     0x0081
  515. #define WM_NCDESTROY                    0x0082
  516. #define WM_NCCALCSIZE                   0x0083
  517. #define WM_NCHITTEST                    0x0084
  518. #define WM_NCPAINT                      0x0085
  519. #define WM_NCACTIVATE                   0x0086
  520. #define WM_GETDLGCODE                   0x0087
  521.  
  522. #define WM_NCMOUSEMOVE                  0x00A0
  523. #define WM_NCLBUTTONDOWN                0x00A1
  524. #define WM_NCLBUTTONUP                  0x00A2
  525. #define WM_NCLBUTTONDBLCLK              0x00A3
  526. #define WM_NCRBUTTONDOWN                0x00A4
  527. #define WM_NCRBUTTONUP                  0x00A5
  528. #define WM_NCRBUTTONDBLCLK              0x00A6
  529. #define WM_NCMBUTTONDOWN                0x00A7
  530. #define WM_NCMBUTTONUP                  0x00A8
  531. #define WM_NCMBUTTONDBLCLK              0x00A9
  532.  
  533. #define WM_KEYFIRST                     0x0100
  534. #define WM_KEYDOWN                      0x0100
  535. #define WM_KEYUP                        0x0101
  536. #define WM_CHAR                         0x0102
  537. #define WM_DEADCHAR                     0x0103
  538. #define WM_SYSKEYDOWN                   0x0104
  539. #define WM_SYSKEYUP                     0x0105
  540. #define WM_SYSCHAR                      0x0106
  541. #define WM_SYSDEADCHAR                  0x0107
  542. #define WM_KEYLAST                      0x0108
  543.  
  544. #define WM_IME_STARTCOMPOSITION         0x010D
  545. #define WM_IME_ENDCOMPOSITION           0x010E
  546. #define WM_IME_COMPOSITION              0x010F
  547. #define WM_IME_KEYLAST                  0x010F
  548.  
  549. #define WM_INITDIALOG                   0x0110
  550. #define WM_COMMAND                      0x0111
  551. #define WM_SYSCOMMAND                   0x0112
  552. #define WM_TIMER                        0x0113
  553. #define WM_HSCROLL                      0x0114
  554. #define WM_VSCROLL                      0x0115
  555. #define WM_INITMENU                     0x0116
  556. #define WM_INITMENUPOPUP                0x0117
  557. #define WM_MENUSELECT                   0x011F
  558. #define WM_MENUCHAR                     0x0120
  559. #define WM_ENTERIDLE                    0x0121
  560.  
  561. #define WM_CTLCOLORMSGBOX               0x0132
  562. #define WM_CTLCOLOREDIT                 0x0133
  563. #define WM_CTLCOLORLISTBOX              0x0134
  564. #define WM_CTLCOLORBTN                  0x0135
  565. #define WM_CTLCOLORDLG                  0x0136
  566. #define WM_CTLCOLORSCROLLBAR            0x0137
  567. #define WM_CTLCOLORSTATIC               0x0138
  568.  
  569. #define WM_MOUSEFIRST                   0x0200
  570. #define WM_MOUSEMOVE                    0x0200
  571. #define WM_LBUTTONDOWN                  0x0201
  572. #define WM_LBUTTONUP                    0x0202
  573. #define WM_LBUTTONDBLCLK                0x0203
  574. #define WM_RBUTTONDOWN                  0x0204
  575. #define WM_RBUTTONUP                    0x0205
  576. #define WM_RBUTTONDBLCLK                0x0206
  577. #define WM_MBUTTONDOWN                  0x0207
  578. #define WM_MBUTTONUP                    0x0208
  579. #define WM_MBUTTONDBLCLK                0x0209
  580. #define WM_MOUSELAST                    0x0209
  581.  
  582. #define WM_PARENTNOTIFY                 0x0210
  583. #define MENULOOP_WINDOW                 0
  584. #define MENULOOP_POPUP                  1
  585. #define WM_ENTERMENULOOP                0x0211
  586. #define WM_EXITMENULOOP                 0x0212
  587.  
  588. #define WM_NEXTMENU                     0x0213
  589.  
  590. #define WM_SIZING                       0x0214
  591. #define WM_CAPTURECHANGED               0x0215
  592. #define WM_MOVING                       0x0216
  593. #define WM_POWERBROADCAST               0x0218
  594. #define WM_DEVICECHANGE                 0x0219
  595.  
  596. #define WM_IME_SETCONTEXT               0x0281
  597. #define WM_IME_NOTIFY                   0x0282
  598. #define WM_IME_CONTROL                  0x0283
  599. #define WM_IME_COMPOSITIONFULL          0x0284
  600. #define WM_IME_SELECT                   0x0285
  601. #define WM_IME_CHAR                     0x0286
  602. #define WM_IME_KEYDOWN                  0x0290
  603. #define WM_IME_KEYUP                    0x0291
  604.  
  605. #define WM_MDICREATE                    0x0220
  606. #define WM_MDIDESTROY                   0x0221
  607. #define WM_MDIACTIVATE                  0x0222
  608. #define WM_MDIRESTORE                   0x0223
  609. #define WM_MDINEXT                      0x0224
  610. #define WM_MDIMAXIMIZE                  0x0225
  611. #define WM_MDITILE                      0x0226
  612. #define WM_MDICASCADE                   0x0227
  613. #define WM_MDIICONARRANGE               0x0228
  614. #define WM_MDIGETACTIVE                 0x0229
  615.  
  616. #define WM_MDISETMENU                   0x0230
  617. #define WM_ENTERSIZEMOVE                0x0231
  618. #define WM_EXITSIZEMOVE                 0x0232
  619. #define WM_DROPFILES                    0x0233
  620. #define WM_MDIREFRESHMENU               0x0234
  621.  
  622. #define WM_CUT                          0x0300
  623. #define WM_COPY                         0x0301
  624. #define WM_PASTE                        0x0302
  625. #define WM_CLEAR                        0x0303
  626. #define WM_UNDO                         0x0304
  627. #define WM_RENDERFORMAT                 0x0305
  628. #define WM_RENDERALLFORMATS             0x0306
  629. #define WM_DESTROYCLIPBOARD             0x0307
  630. #define WM_DRAWCLIPBOARD                0x0308
  631. #define WM_PAINTCLIPBOARD               0x0309
  632. #define WM_VSCROLLCLIPBOARD             0x030A
  633. #define WM_SIZECLIPBOARD                0x030B
  634. #define WM_ASKCBFORMATNAME              0x030C
  635. #define WM_CHANGECBCHAIN                0x030D
  636. #define WM_HSCROLLCLIPBOARD             0x030E
  637. #define WM_QUERYNEWPALETTE              0x030F
  638. #define WM_PALETTEISCHANGING            0x0310
  639. #define WM_PALETTECHANGED               0x0311
  640. #define WM_HOTKEY                       0x0312
  641.  
  642. #define WM_PRINT                        0x0317
  643. #define WM_PRINTCLIENT                  0x0318
  644.  
  645. #define WM_HANDHELDFIRST                0x0358
  646. #define WM_HANDHELDLAST                 0x035F
  647.  
  648. #define WM_AFXFIRST                     0x0360
  649. #define WM_AFXLAST                      0x037F
  650.  
  651. #define WM_PENWINFIRST                  0x0380
  652. #define WM_PENWINLAST                   0x038F
  653.  
  654. #define WM_APP                          0x8000
  655.  
  656. //
  657. // NOTE: All Message Numbers below 0x0400 are RESERVED.
  658. //
  659. // Private Window Messages Start Here:
  660. //
  661. #define WM_USER                         0x0400
  662.  
  663. //  wParam for WM_SIZING message
  664. #define WMSZ_LEFT           1
  665. #define WMSZ_RIGHT          2
  666. #define WMSZ_TOP            3
  667. #define WMSZ_TOPLEFT        4
  668. #define WMSZ_TOPRIGHT       5
  669. #define WMSZ_BOTTOM         6
  670. #define WMSZ_BOTTOMLEFT     7
  671. #define WMSZ_BOTTOMRIGHT    8
  672.  
  673. //
  674. // WM_SYNCTASK Commands
  675. //
  676. #define ST_BEGINSWP         0
  677. #define ST_ENDSWP           1
  678.  
  679. //
  680. // WM_NCHITTEST and MOUSEHOOKSTRUCT Mouse Position Codes
  681. //
  682. #define HTERROR             (-2)
  683. #define HTTRANSPARENT       (-1)
  684. #define HTNOWHERE           0
  685. #define HTCLIENT            1
  686. #define HTCAPTION           2
  687. #define HTSYSMENU           3
  688. #define HTGROWBOX           4
  689. #define HTSIZE              HTGROWBOX
  690. #define HTMENU              5
  691. #define HTHSCROLL           6
  692. #define HTVSCROLL           7
  693. #define HTMINBUTTON         8
  694. #define HTMAXBUTTON         9
  695. #define HTLEFT              10
  696. #define HTRIGHT             11
  697. #define HTTOP               12
  698. #define HTTOPLEFT           13
  699. #define HTTOPRIGHT          14
  700. #define HTBOTTOM            15
  701. #define HTBOTTOMLEFT        16
  702. #define HTBOTTOMRIGHT       17
  703. #define HTBORDER            18
  704. #define HTREDUCE            HTMINBUTTON
  705. #define HTZOOM              HTMAXBUTTON
  706. #define HTSIZEFIRST         HTLEFT
  707. #define HTSIZELAST          HTBOTTOMRIGHT
  708. #define HTOBJECT            19
  709. #define HTCLOSE             20
  710. #define HTHELP              21
  711.  
  712. //
  713. // SendMessageTimeout values
  714. //
  715. #define SMTO_NORMAL         0x0000
  716. #define SMTO_BLOCK          0x0001
  717. #define SMTO_ABORTIFHUNG    0x0002
  718.  
  719. //
  720. // WM_MOUSEACTIVATE Return Codes
  721. //
  722. #define MA_ACTIVATE         1
  723. #define MA_ACTIVATEANDEAT   2
  724. #define MA_NOACTIVATE       3
  725. #define MA_NOACTIVATEANDEAT 4
  726.  
  727. //
  728. // WM_SIZE message wParam values
  729. //
  730. #define SIZE_RESTORED       0
  731. #define SIZE_MINIMIZED      1
  732. #define SIZE_MAXIMIZED      2
  733. #define SIZE_MAXSHOW        3
  734. #define SIZE_MAXHIDE        4
  735.  
  736. //
  737. // Obsolete constant names
  738. //
  739. #define SIZENORMAL          SIZE_RESTORED
  740. #define SIZEICONIC          SIZE_MINIMIZED
  741. #define SIZEFULLSCREEN      SIZE_MAXIMIZED
  742. #define SIZEZOOMSHOW        SIZE_MAXSHOW
  743. #define SIZEZOOMHIDE        SIZE_MAXHIDE
  744.  
  745. //
  746. // WM_NCCALCSIZE "window valid rect" return values
  747. //
  748. #define WVR_ALIGNTOP        0x0010
  749. #define WVR_ALIGNLEFT       0x0020
  750. #define WVR_ALIGNBOTTOM     0x0040
  751. #define WVR_ALIGNRIGHT      0x0080
  752. #define WVR_HREDRAW         0x0100
  753. #define WVR_VREDRAW         0x0200
  754. #define WVR_REDRAW          (bitor(WVR_HREDRAW, WVR_VREDRAW))
  755. #define WVR_VALIDRECTS      0x0400
  756.  
  757. //
  758. // Key State Masks for Mouse Messages
  759. //
  760. #define MK_LBUTTON          0x0001
  761. #define MK_RBUTTON          0x0002
  762. #define MK_SHIFT            0x0004
  763. #define MK_CONTROL          0x0008
  764. #define MK_MBUTTON          0x0010
  765.  
  766. #endif // WIN32API_NOMESSAGES
  767.  
  768. //
  769. // Window Styles
  770. //
  771. #define WS_OVERLAPPED       0x00000000
  772. #define WS_POPUP            0x80000000
  773. #define WS_CHILD            0x40000000
  774. #define WS_MINIMIZE         0x20000000
  775. #define WS_VISIBLE          0x10000000
  776. #define WS_DISABLED         0x08000000
  777. #define WS_CLIPSIBLINGS     0x04000000
  778. #define WS_CLIPCHILDREN     0x02000000
  779. #define WS_MAXIMIZE         0x01000000
  780. #define WS_CAPTION          0x00C00000     /* WS_BORDER | WS_DLGFRAME */
  781. #define WS_BORDER           0x00800000
  782. #define WS_DLGFRAME         0x00400000
  783. #define WS_VSCROLL          0x00200000
  784. #define WS_HSCROLL          0x00100000
  785. #define WS_SYSMENU          0x00080000
  786. #define WS_THICKFRAME       0x00040000
  787. #define WS_GROUP            0x00020000
  788. #define WS_TABSTOP          0x00010000
  789.  
  790. #define WS_MINIMIZEBOX      0x00020000
  791. #define WS_MAXIMIZEBOX      0x00010000
  792.  
  793. #define WS_TILED            WS_OVERLAPPED
  794. #define WS_ICONIC           WS_MINIMIZE
  795. #define WS_SIZEBOX          WS_THICKFRAME
  796. #define WS_TILEDWINDOW      WS_OVERLAPPEDWINDOW
  797.  
  798. //
  799. // Common Window Styles
  800. //
  801. #define WS_OVERLAPPEDWINDOW (bitor(bitor(bitor(bitor(bitor(WS_OVERLAPPED, WS_CAPTION), WS_SYSMENU), WS_THICKFRAME), WS_MINIMIZEBOX), WS_MAXIMIZEBOX))
  802. #define WS_POPUPWINDOW      (bitor(bitor(WS_POPUP, WS_BORDER), WS_SYSMENU))
  803. #define WS_CHILDWINDOW      (WS_CHILD)
  804.  
  805. //
  806. // Extended Window Styles
  807. //
  808. #define WS_EX_DLGMODALFRAME  0x00000001
  809. #define WS_EX_NOPARENTNOTIFY 0x00000004
  810. #define WS_EX_TOPMOST        0x00000008
  811. #define WS_EX_ACCEPTFILES    0x00000010
  812. #define WS_EX_TRANSPARENT    0x00000020
  813. #define WS_EX_MDICHILD          0x00000040
  814. #define WS_EX_TOOLWINDOW        0x00000080
  815. #define WS_EX_WINDOWEDGE        0x00000100
  816. #define WS_EX_CLIENTEDGE        0x00000200
  817. #define WS_EX_CONTEXTHELP       0x00000400
  818.  
  819. #define WS_EX_RIGHT             0x00001000
  820. #define WS_EX_LEFT              0x00000000
  821. #define WS_EX_RTLREADING        0x00002000
  822. #define WS_EX_LTRREADING        0x00000000
  823. #define WS_EX_LEFTSCROLLBAR     0x00004000
  824. #define WS_EX_RIGHTSCROLLBAR    0x00000000
  825.  
  826. #define WS_EX_CONTROLPARENT     0x00010000
  827. #define WS_EX_STATICEDGE        0x00020000
  828. #define WS_EX_APPWINDOW         0x00040000
  829.  
  830. #define WS_EX_OVERLAPPEDWINDOW  (bitor(WS_EX_WINDOWEDGE, WS_EX_CLIENTEDGE))
  831. #define WS_EX_PALETTEWINDOW     (bitor(bitor(WS_EX_WINDOWEDGE, WS_EX_TOOLWINDOW), WS_EX_TOPMOST))
  832.  
  833. //
  834. // Class styles
  835. //
  836. #define CS_VREDRAW          0x0001
  837. #define CS_HREDRAW          0x0002
  838. #define CS_KEYCVTWINDOW     0x0004
  839. #define CS_DBLCLKS          0x0008
  840. #define CS_OWNDC            0x0020
  841. #define CS_CLASSDC          0x0040
  842. #define CS_PARENTDC         0x0080
  843. #define CS_NOKEYCVT         0x0100
  844. #define CS_NOCLOSE          0x0200
  845. #define CS_SAVEBITS         0x0800
  846. #define CS_BYTEALIGNCLIENT  0x1000
  847. #define CS_BYTEALIGNWINDOW  0x2000
  848. #define CS_GLOBALCLASS      0x4000
  849. #define CS_IME              0x00010000
  850.  
  851. // WM_PRINT flags
  852. #define PRF_CHECKVISIBLE    0x00000001
  853. #define PRF_NONCLIENT       0x00000002
  854. #define PRF_CLIENT          0x00000004
  855. #define PRF_ERASEBKGND      0x00000008
  856. #define PRF_CHILDREN        0x00000010
  857. #define PRF_OWNED           0x00000020
  858.  
  859. // 3D border styles
  860. #define BDR_RAISEDOUTER 0x0001
  861. #define BDR_SUNKENOUTER 0x0002
  862. #define BDR_RAISEDINNER 0x0004
  863. #define BDR_SUNKENINNER 0x0008
  864.  
  865. #define BDR_OUTER       0x0003
  866. #define BDR_INNER       0x000C
  867. #define BDR_RAISED      0x0005
  868. #define BDR_SUNKEN      0x000A
  869.  
  870. #define EDGE_RAISED     (bitor(BDR_RAISEDOUTER, BDR_RAISEDINNER))
  871. #define EDGE_SUNKEN     (bitor(BDR_SUNKENOUTER, BDR_SUNKENINNER))
  872. #define EDGE_ETCHED     (bitor(BDR_SUNKENOUTER, BDR_RAISEDINNER))
  873. #define EDGE_BUMP       (bitor(BDR_RAISEDOUTER, BDR_SUNKENINNER))
  874.  
  875. // Border flags
  876. #define BF_LEFT         0x0001
  877. #define BF_TOP          0x0002
  878. #define BF_RIGHT        0x0004
  879. #define BF_BOTTOM       0x0008
  880.  
  881. #define BF_TOPLEFT      (bitor(BF_TOP, BF_LEFT))
  882. #define BF_TOPRIGHT     (bitor(BF_TOP, BF_RIGHT))
  883. #define BF_BOTTOMLEFT   (bitor(BF_BOTTOM, BF_LEFT))
  884. #define BF_BOTTOMRIGHT  (bitor(BF_BOTTOM, BF_RIGHT))
  885. #define BF_RECT         (bitor(bitor(bitor(BF_LEFT, BF_TOP), BF_RIGHT), BF_BOTTOM))
  886.  
  887. #define BF_DIAGONAL     0x0010
  888.  
  889. // For diagonal lines, the BF_RECT flags specify the end point of the
  890. // vector bounded by the rectangle parameter.
  891. #define BF_DIAGONAL_ENDTOPRIGHT     (bitor(bitor(BF_DIAGONAL, BF_TOP), BF_RIGHT))
  892. #define BF_DIAGONAL_ENDTOPLEFT      (bitor(bitor(BF_DIAGONAL, BF_TOP), BF_LEFT))
  893. #define BF_DIAGONAL_ENDBOTTOMLEFT   (bitor(bitor(BF_DIAGONAL, BF_BOTTOM), BF_LEFT))
  894. #define BF_DIAGONAL_ENDBOTTOMRIGHT  (bitor(bitor(BF_DIAGONAL, BF_BOTTOM), BF_RIGHT))
  895.  
  896. #define BF_MIDDLE       0x0800  // Fill in the middle
  897. #define BF_SOFT         0x1000  // For softer buttons
  898. #define BF_ADJUST       0x2000  // Calculate the space left over
  899. #define BF_FLAT         0x4000  // For flat rather than 3D borders
  900. #define BF_MONO         0x8000  // For monochrome borders
  901.  
  902. // flags for DrawFrameControl
  903.  
  904. #define DFC_CAPTION             1
  905. #define DFC_MENU                2
  906. #define DFC_SCROLL              3
  907. #define DFC_BUTTON              4
  908.  
  909. #define DFCS_CAPTIONCLOSE       0x0000
  910. #define DFCS_CAPTIONMIN         0x0001
  911. #define DFCS_CAPTIONMAX         0x0002
  912. #define DFCS_CAPTIONRESTORE     0x0003
  913. #define DFCS_CAPTIONHELP        0x0004
  914.  
  915. #define DFCS_MENUARROW          0x0000
  916. #define DFCS_MENUCHECK          0x0001
  917. #define DFCS_MENUBULLET         0x0002
  918. #define DFCS_MENUARROWRIGHT     0x0004
  919.  
  920. #define DFCS_SCROLLUP           0x0000
  921. #define DFCS_SCROLLDOWN         0x0001
  922. #define DFCS_SCROLLLEFT         0x0002
  923. #define DFCS_SCROLLRIGHT        0x0003
  924. #define DFCS_SCROLLCOMBOBOX     0x0005
  925. #define DFCS_SCROLLSIZEGRIP     0x0008
  926. #define DFCS_SCROLLSIZEGRIPRIGHT 0x0010
  927.  
  928. #define DFCS_BUTTONCHECK        0x0000
  929. #define DFCS_BUTTONRADIOIMAGE   0x0001
  930. #define DFCS_BUTTONRADIOMASK    0x0002
  931. #define DFCS_BUTTONRADIO        0x0004
  932. #define DFCS_BUTTON3STATE       0x0008
  933. #define DFCS_BUTTONPUSH         0x0010
  934.  
  935. #define DFCS_INACTIVE           0x0100
  936. #define DFCS_PUSHED             0x0200
  937. #define DFCS_CHECKED            0x0400
  938. #define DFCS_ADJUSTRECT         0x2000
  939. #define DFCS_FLAT               0x4000
  940. #define DFCS_MONO               0x8000
  941.  
  942. // flags for DrawCaption
  943. #define DC_ACTIVE           0x0001
  944. #define DC_SMALLCAP         0x0002
  945. #define DC_ICON             0x0004
  946. #define DC_TEXT             0x0008
  947. #define DC_INBUTTON         0x0010
  948. #define DC_CAPTION          (bitor(bitor(DC_ICON, DC_TEXT), DC_BUTTONS))
  949. #define DC_NC               (bitor(DC_CAPTION, DC_FRAME))
  950.  
  951. #define IDANI_OPEN          1
  952. #define IDANI_CLOSE         2
  953. #define IDANI_CAPTION       3
  954.  
  955. //
  956. // Predefined Clipboard Formats
  957. //
  958. #define CF_TEXT             1
  959. #define CF_BITMAP           2
  960. #define CF_METAFILEPICT     3
  961. #define CF_SYLK             4
  962. #define CF_DIF              5
  963. #define CF_TIFF             6
  964. #define CF_OEMTEXT          7
  965. #define CF_DIB              8
  966. #define CF_PALETTE          9
  967. #define CF_PENDATA          10
  968. #define CF_RIFF             11
  969. #define CF_WAVE             12
  970. #define CF_UNICODETEXT      13
  971. #define CF_ENHMETAFILE      14
  972. #define CF_HDROP            15
  973. #define CF_LOCALE           16
  974. #define CF_MAX              17
  975.  
  976. #define CF_OWNERDISPLAY     0x0080
  977. #define CF_DSPTEXT          0x0081
  978. #define CF_DSPBITMAP        0x0082
  979. #define CF_DSPMETAFILEPICT  0x0083
  980. #define CF_DSPENHMETAFILE   0x008E
  981.  
  982. //
  983. // "Private" formats don't get GlobalFree()'d
  984. //
  985. #define CF_PRIVATEFIRST     0x0200
  986. #define CF_PRIVATELAST      0x02FF
  987.  
  988. //
  989. // "GDIOBJ" formats do get DeleteObject()'d
  990. //
  991. #define CF_GDIOBJFIRST      0x0300
  992. #define CF_GDIOBJLAST       0x03FF
  993.  
  994.  
  995. //
  996. // Defines for the fVirt field of the Accelerator table structure.
  997. //
  998. #define FVIRTKEY  TRUE          /* Assumed to be == TRUE */
  999. #define FNOINVERT 0x02
  1000. #define FSHIFT    0x04
  1001. #define FCONTROL  0x08
  1002. #define FALT      0x10
  1003.  
  1004. #define WPF_SETMINPOSITION      0x0001
  1005. #define WPF_RESTORETOMAXIMIZED  0x0002
  1006.  
  1007. //
  1008. // Owner draw control types
  1009. //
  1010. #define ODT_MENU        1
  1011. #define ODT_LISTBOX     2
  1012. #define ODT_COMBOBOX    3
  1013. #define ODT_BUTTON      4
  1014. #define ODT_STATIC      5
  1015.  
  1016. //
  1017. // Owner draw actions
  1018. //
  1019. #define ODA_DRAWENTIRE  0x0001
  1020. #define ODA_SELECT      0x0002
  1021. #define ODA_FOCUS       0x0004
  1022.  
  1023. //
  1024. // Owner draw state
  1025. //
  1026. #define ODS_SELECTED    0x0001
  1027. #define ODS_GRAYED      0x0002
  1028. #define ODS_DISABLED    0x0004
  1029. #define ODS_CHECKED     0x0008
  1030. #define ODS_FOCUS       0x0010
  1031. #define ODS_DEFAULT         0x0020
  1032. #define ODS_COMBOBOXEDIT    0x1000
  1033.  
  1034. //
  1035. // PeekMessage() Options
  1036. //
  1037. #define PM_NOREMOVE         0x0000
  1038. #define PM_REMOVE           0x0001
  1039. #define PM_NOYIELD          0x0002
  1040.  
  1041. #define MOD_ALT         0x0001
  1042. #define MOD_CONTROL     0x0002
  1043. #define MOD_SHIFT       0x0004
  1044. #define MOD_WIN         0x0008
  1045.  
  1046. #define IDHOT_SNAPWINDOW        (-1)    /* SHIFT-PRINTSCRN  */
  1047. #define IDHOT_SNAPDESKTOP       (-2)    /* PRINTSCRN        */
  1048.  
  1049. #define EW_RESTARTWINDOWS    0x0042
  1050. #define EW_REBOOTSYSTEM      0x0043
  1051. #define EW_EXITANDEXECAPP    0x0044
  1052.  
  1053. #define EWX_LOGOFF   0
  1054. #define EWX_SHUTDOWN 1
  1055. #define EWX_REBOOT   2
  1056. #define EWX_FORCE    4
  1057. #define EWX_POWEROFF 8
  1058.  
  1059. // Broadcast Special Message Recipient list
  1060. #define BSM_ALLCOMPONENTS       0x00000000
  1061. #define BSM_VXDS                0x00000001
  1062. #define BSM_NETDRIVER           0x00000002
  1063. #define BSM_INSTALLABLEDRIVERS  0x00000004
  1064. #define BSM_APPLICATIONS        0x00000008
  1065.  
  1066. // Broadcast Special Message Flags
  1067. #define BSF_QUERY               0x00000001
  1068. #define BSF_IGNORECURRENTTASK   0x00000002
  1069. #define BSF_FLUSHDISK           0x00000004
  1070. #define BSF_NOHANG              0x00000008
  1071. #define BSF_POSTMESSAGE         0x00000010
  1072. #define BSF_FORCEIFHUNG         0x00000020
  1073. #define BSF_NOTIMEOUTIFNOTHUNG  0x00000040
  1074.  
  1075. #define DBWF_LPARAMPOINTER  0x8000
  1076.  
  1077. #define BROADCAST_QUERY_DENY         0x424D5144  // Return this value to deny a query.
  1078.  
  1079. //
  1080. // Special HWND value for use with PostMessage() and SendMessage()
  1081. //
  1082. #define HWND_BROADCAST  (0xFFFF)
  1083.  
  1084. #define CW_USEDEFAULT       (0x80000000)
  1085.  
  1086. //
  1087. // Special value for CreateWindow, et al.
  1088. //
  1089. #define HWND_DESKTOP        (0)
  1090.  
  1091. //
  1092. // SetWindowPos Flags
  1093. //
  1094. #define SWP_NOSIZE          0x0001
  1095. #define SWP_NOMOVE          0x0002
  1096. #define SWP_NOZORDER        0x0004
  1097. #define SWP_NOREDRAW        0x0008
  1098. #define SWP_NOACTIVATE      0x0010
  1099. #define SWP_FRAMECHANGED    0x0020  /* The frame changed: send WM_NCCALCSIZE */
  1100. #define SWP_SHOWWINDOW      0x0040
  1101. #define SWP_HIDEWINDOW      0x0080
  1102. #define SWP_NOCOPYBITS      0x0100
  1103. #define SWP_NOOWNERZORDER   0x0200  /* Don't do owner Z ordering */
  1104. #define SWP_NOSENDCHANGING  0x0400  /* Don't send WM_WINDOWPOSCHANGING */
  1105.  
  1106. #define SWP_DRAWFRAME       SWP_FRAMECHANGED
  1107. #define SWP_NOREPOSITION    SWP_NOOWNERZORDER
  1108.  
  1109. #define SWP_DEFERERASE      0x2000
  1110. #define SWP_ASYNCWINDOWPOS  0x4000
  1111.  
  1112. #define HWND_TOP        (0)
  1113. #define HWND_BOTTOM     (1)
  1114. #define HWND_TOPMOST    (-1)
  1115. #define HWND_NOTOPMOST  (-2)
  1116.  
  1117. //
  1118. // Window extra byted needed for private dialog classes.
  1119. //
  1120. #define DLGWINDOWEXTRA 30
  1121.  
  1122. #define KEYEVENTF_EXTENDEDKEY 0x0001
  1123. #define KEYEVENTF_KEYUP       0x0002
  1124.  
  1125. #define MOUSEEVENTF_MOVE        0x0001 /* mouse move */
  1126. #define MOUSEEVENTF_LEFTDOWN    0x0002 /* left button down */
  1127. #define MOUSEEVENTF_LEFTUP      0x0004 /* left button up */
  1128. #define MOUSEEVENTF_RIGHTDOWN   0x0008 /* right button down */
  1129. #define MOUSEEVENTF_RIGHTUP     0x0010 /* right button up */
  1130. #define MOUSEEVENTF_MIDDLEDOWN  0x0020 /* middle button down */
  1131. #define MOUSEEVENTF_MIDDLEUP    0x0040 /* middle button up */
  1132. #define MOUSEEVENTF_ABSOLUTE    0x8000 /* absolute move */
  1133.  
  1134. //
  1135. // Queue status flags for GetQueueStatus() and MsgWaitForMultipleObjects()
  1136. //
  1137. #define QS_KEY              0x0001
  1138. #define QS_MOUSEMOVE        0x0002
  1139. #define QS_MOUSEBUTTON      0x0004
  1140. #define QS_POSTMESSAGE      0x0008
  1141. #define QS_TIMER            0x0010
  1142. #define QS_PAINT            0x0020
  1143. #define QS_SENDMESSAGE      0x0040
  1144. #define QS_HOTKEY           0x0080
  1145.  
  1146. #define QS_MOUSE            (bitor(QS_MOUSEMOVE, QS_MOUSEBUTTON))
  1147. #define QS_INPUT            (bitor(QS_MOUSE, QS_KEY))
  1148. #define QS_ALLEVENTS        (bitor(bitor(bitor(bitor(QS_INPUT, QS_POSTMESSAGE), QS_TIMER), QS_PAINT), QS_HOTKEY))
  1149. #define QS_ALLINPUT         (bitor(bitor(bitor(bitor(bitor(QS_INPUT, QS_POSTMESSAGE), QS_TIMER), QS_PAINT), QS_HOTKEY), QS_SENDMESSAGE))
  1150.  
  1151. //
  1152. // GetSystemMetrics() codes
  1153. //
  1154. #define SM_CXSCREEN             0
  1155. #define SM_CYSCREEN             1
  1156. #define SM_CXVSCROLL            2
  1157. #define SM_CYHSCROLL            3
  1158. #define SM_CYCAPTION            4
  1159. #define SM_CXBORDER             5
  1160. #define SM_CYBORDER             6
  1161. #define SM_CXDLGFRAME           7
  1162. #define SM_CYDLGFRAME           8
  1163. #define SM_CYVTHUMB             9
  1164. #define SM_CXHTHUMB             10
  1165. #define SM_CXICON               11
  1166. #define SM_CYICON               12
  1167. #define SM_CXCURSOR             13
  1168. #define SM_CYCURSOR             14
  1169. #define SM_CYMENU               15
  1170. #define SM_CXFULLSCREEN         16
  1171. #define SM_CYFULLSCREEN         17
  1172. #define SM_CYKANJIWINDOW        18
  1173. #define SM_MOUSEPRESENT         19
  1174. #define SM_CYVSCROLL            20
  1175. #define SM_CXHSCROLL            21
  1176. #define SM_DEBUG                22
  1177. #define SM_SWAPBUTTON           23
  1178. #define SM_RESERVED1            24
  1179. #define SM_RESERVED2            25
  1180. #define SM_RESERVED3            26
  1181. #define SM_RESERVED4            27
  1182. #define SM_CXMIN                28
  1183. #define SM_CYMIN                29
  1184. #define SM_CXSIZE               30
  1185. #define SM_CYSIZE               31
  1186. #define SM_CXFRAME              32
  1187. #define SM_CYFRAME              33
  1188. #define SM_CXMINTRACK           34
  1189. #define SM_CYMINTRACK           35
  1190. #define SM_CXDOUBLECLK          36
  1191. #define SM_CYDOUBLECLK          37
  1192. #define SM_CXICONSPACING        38
  1193. #define SM_CYICONSPACING        39
  1194. #define SM_MENUDROPALIGNMENT    40
  1195. #define SM_PENWINDOWS           41
  1196. #define SM_DBCSENABLED          42
  1197. #define SM_CMOUSEBUTTONS        43
  1198.  
  1199. #define SM_CXFIXEDFRAME           SM_CXDLGFRAME  /* ;win40 name change */
  1200. #define SM_CYFIXEDFRAME           SM_CYDLGFRAME  /* ;win40 name change */
  1201. #define SM_CXSIZEFRAME            SM_CXFRAME     /* ;win40 name change */
  1202. #define SM_CYSIZEFRAME            SM_CYFRAME     /* ;win40 name change */
  1203.  
  1204. #define SM_SECURE               44
  1205. #define SM_CXEDGE               45
  1206. #define SM_CYEDGE               46
  1207. #define SM_CXMINSPACING         47
  1208. #define SM_CYMINSPACING         48
  1209. #define SM_CXSMICON             49
  1210. #define SM_CYSMICON             50
  1211. #define SM_CYSMCAPTION          51
  1212. #define SM_CXSMSIZE             52
  1213. #define SM_CYSMSIZE             53
  1214. #define SM_CXMENUSIZE           54
  1215. #define SM_CYMENUSIZE           55
  1216. #define SM_ARRANGE              56
  1217. #define SM_CXMINIMIZED          57
  1218. #define SM_CYMINIMIZED          58
  1219. #define SM_CXMAXTRACK           59
  1220. #define SM_CYMAXTRACK           60
  1221. #define SM_CXMAXIMIZED          61
  1222. #define SM_CYMAXIMIZED          62
  1223. #define SM_NETWORK              63
  1224. #define SM_CLEANBOOT            67
  1225. #define SM_CXDRAG               68
  1226. #define SM_CYDRAG               69
  1227. #define SM_SHOWSOUNDS           70
  1228. #define SM_CXMENUCHECK          71   /* Use instead of GetMenuCheckMarkDimensions()! */
  1229. #define SM_CYMENUCHECK          72
  1230. #define SM_SLOWMACHINE          73
  1231. #define SM_MIDEASTENABLED       74
  1232. #define SM_CMETRICS             75
  1233.  
  1234. // return codes for WM_MENUCHAR
  1235. #define MNC_IGNORE  0
  1236. #define MNC_CLOSE   1
  1237. #define MNC_EXECUTE 2
  1238. #define MNC_SELECT  3
  1239.  
  1240. #define MIIM_STATE       0x00000001
  1241. #define MIIM_ID          0x00000002
  1242. #define MIIM_SUBMENU     0x00000004
  1243. #define MIIM_CHECKMARKS  0x00000008
  1244. #define MIIM_TYPE        0x00000010
  1245. #define MIIM_DATA        0x00000020
  1246.  
  1247. #define GMDI_USEDISABLED    0x0001
  1248. #define GMDI_GOINTOPOPUPS   0x0002
  1249.  
  1250. //
  1251. // Flags for TrackPopupMenu
  1252. //
  1253. #define TPM_LEFTBUTTON  0x0000
  1254. #define TPM_RIGHTBUTTON 0x0002
  1255. #define TPM_LEFTALIGN   0x0000
  1256. #define TPM_CENTERALIGN 0x0004
  1257. #define TPM_RIGHTALIGN  0x0008
  1258. #define TPM_TOPALIGN        0x0000
  1259. #define TPM_VCENTERALIGN    0x0010
  1260. #define TPM_BOTTOMALIGN     0x0020
  1261.  
  1262. #define TPM_HORIZONTAL      0x0000     /* Horz alignment matters more */
  1263. #define TPM_VERTICAL        0x0040     /* Vert alignment matters more */
  1264. #define TPM_NONOTIFY        0x0080     /* Don't send any notification msgs */
  1265. #define TPM_RETURNCMD       0x0100
  1266. //
  1267. // Drag-and-drop support
  1268. //
  1269. #define DOF_EXECUTABLE      0x8001
  1270. #define DOF_DOCUMENT        0x8002
  1271. #define DOF_DIRECTORY       0x8003
  1272. #define DOF_MULTIPLE        0x8004
  1273. #define DOF_PROGMAN         0x0001
  1274. #define DOF_SHELLDATA       0x0002
  1275.  
  1276. #define DO_DROPFILE         0x454C4946
  1277. #define DO_PRINTFILE        0x544E5250
  1278.  
  1279. //
  1280. // DrawText() Format Flags
  1281. //
  1282. #define DT_TOP              0x00000000
  1283. #define DT_LEFT             0x00000000
  1284. #define DT_CENTER           0x00000001
  1285. #define DT_RIGHT            0x00000002
  1286. #define DT_VCENTER          0x00000004
  1287. #define DT_BOTTOM           0x00000008
  1288. #define DT_WORDBREAK        0x00000010
  1289. #define DT_SINGLELINE       0x00000020
  1290. #define DT_EXPANDTABS       0x00000040
  1291. #define DT_TABSTOP          0x00000080
  1292. #define DT_NOCLIP           0x00000100
  1293. #define DT_EXTERNALLEADING  0x00000200
  1294. #define DT_CALCRECT         0x00000400
  1295. #define DT_NOPREFIX         0x00000800
  1296. #define DT_INTERNAL         0x00001000
  1297.  
  1298. #define DT_EDITCONTROL      0x00002000
  1299. #define DT_PATH_ELLIPSIS    0x00004000
  1300. #define DT_END_ELLIPSIS     0x00008000
  1301. #define DT_MODIFYSTRING     0x00010000
  1302. #define DT_RTLREADING       0x00020000
  1303. #define DT_WORD_ELLIPSIS    0x00040000
  1304.  
  1305. // Monolithic state-drawing routine
  1306. // Image type
  1307. #define DST_COMPLEX     0x0000
  1308. #define DST_TEXT        0x0001
  1309. #define DST_PREFIXTEXT  0x0002
  1310. #define DST_ICON        0x0003
  1311. #define DST_BITMAP      0x0004
  1312.  
  1313. // State type
  1314. #define DSS_NORMAL      0x0000
  1315. #define DSS_UNION       0x0010  /* Gray string appearance */
  1316. #define DSS_DISABLED    0x0020
  1317. #define DSS_MONO        0x0080
  1318. #define DSS_RIGHT       0x8000
  1319.  
  1320. //
  1321. // GetDCEx() flags
  1322. //
  1323. #define DCX_WINDOW           0x00000001
  1324. #define DCX_CACHE            0x00000002
  1325. #define DCX_NORESETATTRS     0x00000004
  1326. #define DCX_CLIPCHILDREN     0x00000008
  1327. #define DCX_CLIPSIBLINGS     0x00000010
  1328. #define DCX_PARENTCLIP       0x00000020
  1329.  
  1330. #define DCX_EXCLUDERGN       0x00000040
  1331. #define DCX_INTERSECTRGN     0x00000080
  1332.  
  1333. #define DCX_EXCLUDEUPDATE    0x00000100
  1334. #define DCX_INTERSECTUPDATE  0x00000200
  1335.  
  1336. #define DCX_LOCKWINDOWUPDATE 0x00000400
  1337.  
  1338. #define DCX_VALIDATE         0x00200000
  1339.  
  1340. //
  1341. // RedrawWindow() flags
  1342. //
  1343. #define RDW_INVALIDATE          0x0001
  1344. #define RDW_INTERNALPAINT       0x0002
  1345. #define RDW_ERASE               0x0004
  1346.  
  1347. #define RDW_VALIDATE            0x0008
  1348. #define RDW_NOINTERNALPAINT     0x0010
  1349. #define RDW_NOERASE             0x0020
  1350.  
  1351. #define RDW_NOCHILDREN          0x0040
  1352. #define RDW_ALLCHILDREN         0x0080
  1353.  
  1354. #define RDW_UPDATENOW           0x0100
  1355. #define RDW_ERASENOW            0x0200
  1356.  
  1357. #define RDW_FRAME               0x0400
  1358. #define RDW_NOFRAME             0x0800
  1359.  
  1360. #define SW_SCROLLCHILDREN   0x0001  /* Scroll children within *lprcScroll. */
  1361. #define SW_INVALIDATE       0x0002  /* Invalidate after scrolling */
  1362. #define SW_ERASE            0x0004  /* If SW_INVALIDATE, don't send WM_ERASEBACKGROUND */
  1363.  
  1364. //
  1365. // EnableScrollBar() flags
  1366. //
  1367. #define ESB_ENABLE_BOTH     0x0000
  1368. #define ESB_DISABLE_BOTH    0x0003
  1369.  
  1370. #define ESB_DISABLE_LEFT    0x0001
  1371. #define ESB_DISABLE_RIGHT   0x0002
  1372.  
  1373. #define ESB_DISABLE_UP      0x0001
  1374. #define ESB_DISABLE_DOWN    0x0002
  1375.  
  1376. #define ESB_DISABLE_LTUP    ESB_DISABLE_LEFT
  1377. #define ESB_DISABLE_RTDN    ESB_DISABLE_RIGHT
  1378.  
  1379. #define HELPINFO_WINDOW    0x0001
  1380. #define HELPINFO_MENUITEM  0x0002
  1381.  
  1382. //
  1383. // MessageBox() Flags
  1384. //
  1385. #define MB_OK                       0x00000000
  1386. #define MB_OKCANCEL                 0x00000001
  1387. #define MB_ABORTRETRYIGNORE         0x00000002
  1388. #define MB_YESNOCANCEL              0x00000003
  1389. #define MB_YESNO                    0x00000004
  1390. #define MB_RETRYCANCEL              0x00000005
  1391.  
  1392. #define MB_ICONHAND                 0x00000010
  1393. #define MB_ICONQUESTION             0x00000020
  1394. #define MB_ICONEXCLAMATION          0x00000030
  1395. #define MB_ICONASTERISK             0x00000040
  1396.  
  1397. #define MB_ICONWARNING              MB_ICONEXCLAMATION
  1398. #define MB_ICONERROR                MB_ICONHAND
  1399.  
  1400. #define MB_ICONINFORMATION          MB_ICONASTERISK
  1401. #define MB_ICONSTOP                 MB_ICONHAND
  1402.  
  1403. #define MB_DEFBUTTON1               0x00000000
  1404. #define MB_DEFBUTTON2               0x00000100
  1405. #define MB_DEFBUTTON3               0x00000200
  1406. #define MB_DEFBUTTON4               0x00000300
  1407.  
  1408. #define MB_APPLMODAL                0x00000000
  1409. #define MB_SYSTEMMODAL              0x00001000
  1410. #define MB_TASKMODAL                0x00002000
  1411. #define MB_HELP                     0x00004000 // Help Button
  1412. #define MB_RIGHT                    0x00080000
  1413. #define MB_RTLREADING               0x00100000
  1414.  
  1415. #define MB_NOFOCUS                  0x00008000
  1416. #define MB_SETFOREGROUND            0x00010000
  1417. #define MB_DEFAULT_DESKTOP_ONLY     0x00020000
  1418. #define MB_SERVICE_NOTIFICATION     0x00040000
  1419.  
  1420. #define MB_TYPEMASK                 0x0000000F
  1421. #define MB_USERICON                 0x00000080
  1422. #define MB_ICONMASK                 0x000000F0
  1423. #define MB_DEFMASK                  0x00000F00
  1424. #define MB_MODEMASK                 0x00003000
  1425. #define MB_MISCMASK                 0x0000C000
  1426.  
  1427. #define MB_TOPMOST                  0x00040000
  1428.  
  1429. #define CWP_ALL             0x0000
  1430. #define CWP_SKIPINVISIBLE   0x0001
  1431. #define CWP_SKIPDISABLED    0x0002
  1432. #define CWP_SKIPTRANSPARENT 0x0004
  1433.  
  1434. //
  1435. // Color Types
  1436. //
  1437. #define CTLCOLOR_MSGBOX         0
  1438. #define CTLCOLOR_EDIT           1
  1439. #define CTLCOLOR_LISTBOX        2
  1440. #define CTLCOLOR_BTN            3
  1441. #define CTLCOLOR_DLG            4
  1442. #define CTLCOLOR_SCROLLBAR      5
  1443. #define CTLCOLOR_STATIC         6
  1444. #define CTLCOLOR_MAX            7
  1445.  
  1446. #define COLOR_SCROLLBAR         0
  1447. #define COLOR_BACKGROUND        1
  1448. #define COLOR_ACTIVECAPTION     2
  1449. #define COLOR_INACTIVECAPTION   3
  1450. #define COLOR_MENU              4
  1451. #define COLOR_WINDOW            5
  1452. #define COLOR_WINDOWFRAME       6
  1453. #define COLOR_MENUTEXT          7
  1454. #define COLOR_WINDOWTEXT        8
  1455. #define COLOR_CAPTIONTEXT       9
  1456. #define COLOR_ACTIVEBORDER      10
  1457. #define COLOR_INACTIVEBORDER    11
  1458. #define COLOR_APPWORKSPACE      12
  1459. #define COLOR_HIGHLIGHT         13
  1460. #define COLOR_HIGHLIGHTTEXT     14
  1461. #define COLOR_BTNFACE           15
  1462. #define COLOR_BTNSHADOW         16
  1463. #define COLOR_GRAYTEXT          17
  1464. #define COLOR_BTNTEXT           18
  1465. #define COLOR_INACTIVECAPTIONTEXT 19
  1466. #define COLOR_BTNHIGHLIGHT      20
  1467.  
  1468. #define COLOR_3DDKSHADOW        21
  1469. #define COLOR_3DLIGHT           22
  1470. #define COLOR_INFOTEXT          23
  1471. #define COLOR_INFOBK            24
  1472.  
  1473. #define COLOR_DESKTOP           COLOR_BACKGROUND
  1474. #define COLOR_3DFACE            COLOR_BTNFACE
  1475. #define COLOR_3DSHADOW          COLOR_BTNSHADOW
  1476. #define COLOR_3DHIGHLIGHT       COLOR_BTNHIGHLIGHT
  1477. #define COLOR_3DHILIGHT         COLOR_BTNHIGHLIGHT
  1478. #define COLOR_BTNHILIGHT        COLOR_BTNHIGHLIGHT
  1479.  
  1480. //
  1481. // GetWindow() Constants
  1482. //
  1483. #define GW_HWNDFIRST        0
  1484. #define GW_HWNDLAST         1
  1485. #define GW_HWNDNEXT         2
  1486. #define GW_HWNDPREV         3
  1487. #define GW_OWNER            4
  1488. #define GW_CHILD            5
  1489. #define GW_MAX              5
  1490.  
  1491. // win40  -- A lot of MF_* flags have been renamed 
  1492. //           as MFT_* and MFS_* flags
  1493. //
  1494. // Menu flags for Add/Check/EnableMenuItem()
  1495. //
  1496. #define MF_INSERT           0x00000000
  1497. #define MF_CHANGE           0x00000080
  1498. #define MF_APPEND           0x00000100
  1499. #define MF_DELETE           0x00000200
  1500. #define MF_REMOVE           0x00001000
  1501.  
  1502. #define MF_BYCOMMAND        0x00000000
  1503. #define MF_BYPOSITION       0x00000400
  1504.  
  1505. #define MF_SEPARATOR        0x00000800
  1506.  
  1507. #define MF_ENABLED          0x00000000
  1508. #define MF_GRAYED           0x00000001
  1509. #define MF_DISABLED         0x00000002
  1510.  
  1511. #define MF_UNCHECKED        0x00000000
  1512. #define MF_CHECKED          0x00000008
  1513. #define MF_USECHECKBITMAPS  0x00000200
  1514.  
  1515. #define MF_STRING           0x00000000
  1516. #define MF_BITMAP           0x00000004
  1517. #define MF_OWNERDRAW        0x00000100
  1518.  
  1519. #define MF_POPUP            0x00000010
  1520. #define MF_MENUBARBREAK     0x00000020
  1521. #define MF_MENUBREAK        0x00000040
  1522.  
  1523. #define MF_UNHILITE         0x00000000
  1524. #define MF_HILITE           0x00000080
  1525.  
  1526. #define MF_DEFAULT          0x00001000
  1527. #define MF_SYSMENU          0x00002000
  1528. #define MF_HELP             0x00004000
  1529. #define MF_RIGHTJUSTIFY     0x00004000
  1530.  
  1531. #define MF_MOUSESELECT      0x00008000
  1532. #define MF_END              0x00000080  /* Obsolete -- only used by old RES files */
  1533.  
  1534. #define MFT_STRING          MF_STRING
  1535. #define MFT_BITMAP          MF_BITMAP
  1536. #define MFT_MENUBARBREAK    MF_MENUBARBREAK
  1537. #define MFT_MENUBREAK       MF_MENUBREAK
  1538. #define MFT_OWNERDRAW       MF_OWNERDRAW
  1539. #define MFT_RADIOCHECK      0x00000200
  1540. #define MFT_SEPARATOR       MF_SEPARATOR
  1541. #define MFT_RIGHTORDER      0x00002000
  1542. #define MFT_RIGHTJUSTIFY    MF_RIGHTJUSTIFY
  1543.  
  1544. // Menu flags for Add/Check/EnableMenuItem()
  1545. #define MFS_GRAYED          0x00000003
  1546. #define MFS_DISABLED        MFS_GRAYED
  1547. #define MFS_CHECKED         MF_CHECKED
  1548. #define MFS_HILITE          MF_HILITE
  1549. #define MFS_ENABLED         MF_ENABLED
  1550. #define MFS_UNCHECKED       MF_UNCHECKED
  1551. #define MFS_UNHILITE        MF_UNHILITE
  1552. #define MFS_DEFAULT         MF_DEFAULT
  1553.  
  1554. //
  1555. // System Menu Command Values
  1556. //
  1557. #define SC_SIZE         0xF000
  1558. #define SC_MOVE         0xF010
  1559. #define SC_MINIMIZE     0xF020
  1560. #define SC_MAXIMIZE     0xF030
  1561. #define SC_NEXTWINDOW   0xF040
  1562. #define SC_PREVWINDOW   0xF050
  1563. #define SC_CLOSE        0xF060
  1564. #define SC_VSCROLL      0xF070
  1565. #define SC_HSCROLL      0xF080
  1566. #define SC_MOUSEMENU    0xF090
  1567. #define SC_KEYMENU      0xF100
  1568. #define SC_ARRANGE      0xF110
  1569. #define SC_RESTORE      0xF120
  1570. #define SC_TASKLIST     0xF130
  1571. #define SC_SCREENSAVE   0xF140
  1572. #define SC_HOTKEY       0xF150
  1573. #define SC_DEFAULT      0xF160
  1574. #define SC_MONITORPOWER 0xF170
  1575. #define SC_CONTEXTHELP  0xF180
  1576. #define SC_SEPARATOR    0xF00F
  1577.  
  1578. //
  1579. // Obsolete names
  1580. //
  1581. #define SC_ICON         SC_MINIMIZE
  1582. #define SC_ZOOM         SC_MAXIMIZE
  1583.  
  1584. //
  1585. // Standard Cursor IDs
  1586. //
  1587. #define IDC_ARROW           (32512)
  1588. #define IDC_IBEAM           (32513)
  1589. #define IDC_WAIT            (32514)
  1590. #define IDC_CROSS           (32515)
  1591. #define IDC_UPARROW         (32516)
  1592. #define IDC_SIZE            (32640)  /* OBSOLETE: use IDC_SIZEALL */
  1593. #define IDC_ICON            (32641)  /* OBSOLETE: use IDC_ARROW */
  1594. #define IDC_SIZENWSE        (32642)
  1595. #define IDC_SIZENESW        (32643)
  1596. #define IDC_SIZEWE          (32644)
  1597. #define IDC_SIZENS          (32645)
  1598. #define IDC_SIZEALL         (32646)
  1599. #define IDC_NO              (32648) /*not in win3.1 */
  1600. #define IDC_APPSTARTING     (32650) /*not in win3.1 */
  1601. #define IDC_HELP            (32651)
  1602.  
  1603. #define IMAGE_BITMAP        0
  1604. #define IMAGE_ICON          1
  1605. #define IMAGE_CURSOR        2
  1606. #define IMAGE_ENHMETAFILE   3
  1607.  
  1608. #define LR_DEFAULTCOLOR     0x0000
  1609. #define LR_MONOCHROME       0x0001
  1610. #define LR_COLOR            0x0002
  1611. #define LR_COPYRETURNORG    0x0004
  1612. #define LR_COPYDELETEORG    0x0008
  1613. #define LR_LOADFROMFILE     0x0010
  1614. #define LR_LOADTRANSPARENT  0x0020
  1615. #define LR_DEFAULTSIZE      0x0040
  1616. #define LR_LOADMAP3DCOLORS  0x1000
  1617. #define LR_CREATEDIBSECTION 0x2000
  1618. #define LR_COPYFROMRESOURCE 0x4000
  1619. #define LR_SHARED           0x8000
  1620.  
  1621. #define DI_MASK         0x0001
  1622. #define DI_IMAGE        0x0002
  1623. #define DI_NORMAL       0x0003
  1624. #define DI_COMPAT       0x0004
  1625. #define DI_DEFAULTSIZE  0x0008
  1626.  
  1627. #define RES_ICON    1
  1628. #define RES_CURSOR  2
  1629.  
  1630. //
  1631. // OEM Resource Ordinal Numbers
  1632. //
  1633. #define OBM_CLOSE           32754
  1634. #define OBM_UPARROW         32753
  1635. #define OBM_DNARROW         32752
  1636. #define OBM_RGARROW         32751
  1637. #define OBM_LFARROW         32750
  1638. #define OBM_REDUCE          32749
  1639. #define OBM_ZOOM            32748
  1640. #define OBM_RESTORE         32747
  1641. #define OBM_REDUCED         32746
  1642. #define OBM_ZOOMD           32745
  1643. #define OBM_RESTORED        32744
  1644. #define OBM_UPARROWD        32743
  1645. #define OBM_DNARROWD        32742
  1646. #define OBM_RGARROWD        32741
  1647. #define OBM_LFARROWD        32740
  1648. #define OBM_MNARROW         32739
  1649. #define OBM_COMBO           32738
  1650. #define OBM_UPARROWI        32737
  1651. #define OBM_DNARROWI        32736
  1652. #define OBM_RGARROWI        32735
  1653. #define OBM_LFARROWI        32734
  1654.  
  1655. #define OBM_OLD_CLOSE       32767
  1656. #define OBM_SIZE            32766
  1657. #define OBM_OLD_UPARROW     32765
  1658. #define OBM_OLD_DNARROW     32764
  1659. #define OBM_OLD_RGARROW     32763
  1660. #define OBM_OLD_LFARROW     32762
  1661. #define OBM_BTSIZE          32761
  1662. #define OBM_CHECK           32760
  1663. #define OBM_CHECKBOXES      32759
  1664. #define OBM_BTNCORNERS      32758
  1665. #define OBM_OLD_REDUCE      32757
  1666. #define OBM_OLD_ZOOM        32756
  1667. #define OBM_OLD_RESTORE     32755
  1668.  
  1669. #define OCR_NORMAL          32512
  1670. #define OCR_IBEAM           32513
  1671. #define OCR_WAIT            32514
  1672. #define OCR_CROSS           32515
  1673. #define OCR_UP              32516
  1674. #define OCR_SIZE            32640   /* OBSOLETE: use OCR_SIZEALL */
  1675. #define OCR_ICON            32641   /* OBSOLETE: use OCR_NORMAL */
  1676. #define OCR_SIZENWSE        32642
  1677. #define OCR_SIZENESW        32643
  1678. #define OCR_SIZEWE          32644
  1679. #define OCR_SIZENS          32645
  1680. #define OCR_SIZEALL         32646
  1681. #define OCR_ICOCUR          32647   /* OBSOLETE: use OIC_WINLOGO */
  1682. #define OCR_NO              32648
  1683. #define OCR_APPSTARTING     32650
  1684.  
  1685. #define OIC_SAMPLE          32512
  1686. #define OIC_HAND            32513
  1687. #define OIC_QUES            32514
  1688. #define OIC_BANG            32515
  1689. #define OIC_NOTE            32516
  1690.  
  1691. #define OIC_WINLOGO         32517
  1692. #define OIC_WARNING         OIC_BANG
  1693. #define OIC_ERROR           OIC_HAND
  1694. #define OIC_INFORMATION     OIC_NOTE
  1695.  
  1696. #define ORD_LANGDRIVER    1     // The ordinal number for the entry point of
  1697.                                 // language drivers.
  1698.  
  1699. //
  1700. // Standard Icon IDs
  1701. //
  1702. #define IDI_APPLICATION     (32512)
  1703. #define IDI_HAND            (32513)
  1704. #define IDI_QUESTION        (32514)
  1705. #define IDI_EXCLAMATION     (32515)
  1706. #define IDI_ASTERISK        (32516)
  1707. #define IDI_WINLOGO         (32517)
  1708.  
  1709. #define IDI_WARNING     IDI_EXCLAMATION
  1710. #define IDI_ERROR       IDI_HAND
  1711. #define IDI_INFORMATION IDI_ASTERISK
  1712.  
  1713. //
  1714. // Dialog Box Command IDs
  1715. //
  1716. #define IDOK                1
  1717. #define IDCANCEL            2
  1718. #define IDABORT             3
  1719. #define IDRETRY             4
  1720. #define IDIGNORE            5
  1721. #define IDYES               6
  1722. #define IDNO                7
  1723. #define IDCLOSE         8
  1724. #define IDHELP          9
  1725.  
  1726. //
  1727. // Edit Control Styles
  1728. //
  1729. #define ES_LEFT             0x0000
  1730. #define ES_CENTER           0x0001
  1731. #define ES_RIGHT            0x0002
  1732. #define ES_MULTILINE        0x0004
  1733. #define ES_UPPERCASE        0x0008
  1734. #define ES_LOWERCASE        0x0010
  1735. #define ES_PASSWORD         0x0020
  1736. #define ES_AUTOVSCROLL      0x0040
  1737. #define ES_AUTOHSCROLL      0x0080
  1738. #define ES_NOHIDESEL        0x0100
  1739. #define ES_OEMCONVERT       0x0400
  1740. #define ES_READONLY         0x0800
  1741. #define ES_WANTRETURN       0x1000
  1742. #define ES_NUMBER           0x2000
  1743. //
  1744. // Edit Control Notification Codes
  1745. //
  1746. #define EN_SETFOCUS         0x0100
  1747. #define EN_KILLFOCUS        0x0200
  1748. #define EN_CHANGE           0x0300
  1749. #define EN_UPDATE           0x0400
  1750. #define EN_ERRSPACE         0x0500
  1751. #define EN_MAXTEXT          0x0501
  1752. #define EN_HSCROLL          0x0601
  1753. #define EN_VSCROLL          0x0602
  1754.  
  1755. // Edit control EM_SETMARGIN parameters */
  1756. #define EC_LEFTMARGIN       0x0001
  1757. #define EC_RIGHTMARGIN      0x0002
  1758. #define EC_USEFONTINFO      0xffff
  1759.  
  1760. #ifndef WIN32API_NOMESSAGES
  1761.  
  1762. //
  1763. // Edit Control Messages
  1764. //
  1765. #define EM_GETSEL               0x00B0
  1766. #define EM_SETSEL               0x00B1
  1767. #define EM_GETRECT              0x00B2
  1768. #define EM_SETRECT              0x00B3
  1769. #define EM_SETRECTNP            0x00B4
  1770. #define EM_SCROLL               0x00B5
  1771. #define EM_LINESCROLL           0x00B6
  1772. #define EM_SCROLLCARET          0x00B7
  1773. #define EM_GETMODIFY            0x00B8
  1774. #define EM_SETMODIFY            0x00B9
  1775. #define EM_GETLINECOUNT         0x00BA
  1776. #define EM_LINEINDEX            0x00BB
  1777. #define EM_SETHANDLE            0x00BC
  1778. #define EM_GETHANDLE            0x00BD
  1779. #define EM_GETTHUMB             0x00BE
  1780. #define EM_LINELENGTH           0x00C1
  1781. #define EM_REPLACESEL           0x00C2
  1782. #define EM_GETLINE              0x00C4
  1783. #define EM_LIMITTEXT            0x00C5
  1784. #define EM_CANUNDO              0x00C6
  1785. #define EM_UNDO                 0x00C7
  1786. #define EM_FMTLINES             0x00C8
  1787. #define EM_LINEFROMCHAR         0x00C9
  1788. #define EM_SETTABSTOPS          0x00CB
  1789. #define EM_SETPASSWORDCHAR      0x00CC
  1790. #define EM_EMPTYUNDOBUFFER      0x00CD
  1791. #define EM_GETFIRSTVISIBLELINE  0x00CE
  1792. #define EM_SETREADONLY          0x00CF
  1793. #define EM_SETWORDBREAKPROC     0x00D0
  1794. #define EM_GETWORDBREAKPROC     0x00D1
  1795. #define EM_GETPASSWORDCHAR      0x00D2
  1796. #define EM_SETMARGINS           0x00D3
  1797. #define EM_GETMARGINS           0x00D4
  1798. #define EM_SETLIMITTEXT         EM_LIMITTEXT   /* ;win40 Name change */
  1799. #define EM_GETLIMITTEXT         0x00D5
  1800. #define EM_POSFROMCHAR          0x00D6
  1801. #define EM_CHARFROMPOS          0x00D7
  1802.  
  1803. #endif // WIN32API_NOMESSAGES
  1804.  
  1805. //
  1806. // EDITWORDBREAKPROC code values
  1807. //
  1808. #define WB_LEFT            0
  1809. #define WB_RIGHT           1
  1810. #define WB_ISDELIMITER     2
  1811.  
  1812. //
  1813. // Button Control Styles
  1814. //
  1815. #define BS_PUSHBUTTON       0x00000000
  1816. #define BS_DEFPUSHBUTTON    0x00000001
  1817. #define BS_CHECKBOX         0x00000002
  1818. #define BS_AUTOCHECKBOX     0x00000003
  1819. #define BS_RADIOBUTTON      0x00000004
  1820. #define BS_3STATE           0x00000005
  1821. #define BS_AUTO3STATE       0x00000006
  1822. #define BS_GROUPBOX         0x00000007
  1823. #define BS_USERBUTTON       0x00000008
  1824. #define BS_AUTORADIOBUTTON  0x00000009
  1825. #define BS_OWNERDRAW        0x0000000B
  1826. #define BS_LEFTTEXT         0x00000020
  1827. #define BS_TEXT             0x00000000
  1828. #define BS_ICON             0x00000040
  1829. #define BS_BITMAP           0x00000080
  1830. #define BS_LEFT             0x00000100
  1831. #define BS_RIGHT            0x00000200
  1832. #define BS_CENTER           0x00000300
  1833. #define BS_TOP              0x00000400
  1834. #define BS_BOTTOM           0x00000800
  1835. #define BS_VCENTER          0x00000C00
  1836. #define BS_PUSHLIKE         0x00001000
  1837. #define BS_MULTILINE        0x00002000
  1838. #define BS_NOTIFY           0x00004000
  1839. #define BS_FLAT             0x00008000
  1840. #define BS_RIGHTBUTTON      BS_LEFTTEXT
  1841.  
  1842. //
  1843. // User Button Notification Codes
  1844. //
  1845. #define BN_CLICKED          0
  1846. #define BN_PAINT            1
  1847. #define BN_HILITE           2
  1848. #define BN_UNHILITE         3
  1849. #define BN_DISABLE          4
  1850. #define BN_DOUBLECLICKED    5
  1851.  
  1852. #define BN_PUSHED           BN_HILITE
  1853. #define BN_UNPUSHED         BN_UNHILITE
  1854. #define BN_DBLCLK           BN_DOUBLECLICKED
  1855. #define BN_SETFOCUS         6
  1856. #define BN_KILLFOCUS        7
  1857.  
  1858. #ifndef WIN32API_NOMESSAGES
  1859.  
  1860. //
  1861. // Button Control Messages
  1862. //
  1863. #define BM_GETCHECK        0x00F0
  1864. #define BM_SETCHECK        0x00F1
  1865. #define BM_GETSTATE        0x00F2
  1866. #define BM_SETSTATE        0x00F3
  1867. #define BM_SETSTYLE        0x00F4
  1868.  
  1869. #define BM_CLICK           0x00F5
  1870. #define BM_GETIMAGE        0x00F6
  1871. #define BM_SETIMAGE        0x00F7
  1872.  
  1873. #define BST_UNCHECKED      0x0000
  1874. #define BST_CHECKED        0x0001
  1875. #define BST_INDETERMINATE  0x0002
  1876. #define BST_PUSHED         0x0004
  1877. #define BST_FOCUS          0x0008
  1878.  
  1879. #endif // WIN32API_NOMESSAGES
  1880.  
  1881. //
  1882. // Static Control Constants
  1883. //
  1884. #define SS_LEFT             0x00000000
  1885. #define SS_CENTER           0x00000001
  1886. #define SS_RIGHT            0x00000002
  1887. #define SS_ICON             0x00000003
  1888. #define SS_BLACKRECT        0x00000004
  1889. #define SS_GRAYRECT         0x00000005
  1890. #define SS_WHITERECT        0x00000006
  1891. #define SS_BLACKFRAME       0x00000007
  1892. #define SS_GRAYFRAME        0x00000008
  1893. #define SS_WHITEFRAME       0x00000009
  1894. #define SS_USERITEM         0x0000000A
  1895. #define SS_SIMPLE           0x0000000B
  1896. #define SS_LEFTNOWORDWRAP   0x0000000C
  1897. #define SS_BITMAP           0x0000000E
  1898.  
  1899. #define SS_OWNERDRAW        0x0000000D
  1900. #define SS_ENHMETAFILE      0x0000000F
  1901. #define SS_ETCHEDHORZ       0x00000010
  1902. #define SS_ETCHEDVERT       0x00000011
  1903. #define SS_ETCHEDFRAME      0x00000012
  1904. #define SS_TYPEMASK         0x0000001F
  1905.  
  1906. #define SS_NOPREFIX         0x00000080 /* Don't do "&" character translation */
  1907. #define SS_NOTIFY           0x00000100
  1908. #define SS_CENTERIMAGE      0x00000200
  1909. #define SS_RIGHTJUST        0x00000400
  1910. #define SS_REALSIZEIMAGE    0x00000800
  1911. #define SS_SUNKEN           0x00001000
  1912.  
  1913. #ifndef WIN32API_NOMESSAGES
  1914.  
  1915. //
  1916. // Static Control Mesages
  1917. //
  1918. #define STM_SETICON         0x0170
  1919. #define STM_GETICON         0x0171
  1920. #define STM_SETIMAGE        0x0172
  1921. #define STM_GETIMAGE        0x0173
  1922.  
  1923. #define STN_CLICKED         0
  1924. #define STN_DBLCLK          1
  1925. #define STN_ENABLE          2
  1926. #define STN_DISABLE         3
  1927. #define STM_MSGMAX          0x0174
  1928.  
  1929. #endif // WIN32API_NOMESSAGES
  1930.  
  1931. //
  1932. // Dialog window class
  1933. //
  1934. #define WC_DIALOG       0x8002
  1935.  
  1936. //
  1937. // Get/SetWindowWord/Long offsets for use with WC_DIALOG windows
  1938. //
  1939. #define DWL_MSGRESULT   0
  1940. #define DWL_DLGPROC     4
  1941. #define DWL_USER        8
  1942.  
  1943. //
  1944. // DlgDirList, DlgDirListComboBox flags values
  1945. //
  1946. #define DDL_READWRITE       0x0000
  1947. #define DDL_READONLY        0x0001
  1948. #define DDL_HIDDEN          0x0002
  1949. #define DDL_SYSTEM          0x0004
  1950. #define DDL_DIRECTORY       0x0010
  1951. #define DDL_ARCHIVE         0x0020
  1952.  
  1953. #define DDL_POSTMSGS        0x2000
  1954. #define DDL_DRIVES          0x4000
  1955. #define DDL_EXCLUSIVE       0x8000
  1956.  
  1957. //
  1958. // Dialog Styles
  1959. //
  1960. #define DS_ABSALIGN         0x01
  1961. #define DS_SYSMODAL         0x02
  1962. #define DS_LOCALEDIT        0x20   /* Edit items get Local storage. */
  1963. #define DS_SETFONT          0x40   /* User specified font for Dlg controls */
  1964. #define DS_MODALFRAME       0x80   /* Can be combined with WS_CAPTION  */
  1965. #define DS_NOIDLEMSG        0x100  /* WM_ENTERIDLE message will not be sent */
  1966. #define DS_SETFOREGROUND    0x200  /* not in win3.1 */
  1967.  
  1968. #define DS_3DLOOK           0x0004
  1969. #define DS_FIXEDSYS         0x0008
  1970. #define DS_NOFAILCREATE     0x0010
  1971. #define DS_CONTROL          0x0400
  1972. #define DS_CENTER           0x0800
  1973. #define DS_CENTERMOUSE      0x1000
  1974. #define DS_CONTEXTHELP      0x2000
  1975.  
  1976. #define DM_GETDEFID         (WM_USER+0)
  1977. #define DM_SETDEFID         (WM_USER+1)
  1978.  
  1979. #define DM_REPOSITION       (WM_USER+2)
  1980.  
  1981. #define PSM_PAGEINFO        (WM_USER+100)
  1982. #define PSM_SHEETINFO       (WM_USER+101)
  1983.  
  1984. #define PSI_SETACTIVE       0x0001
  1985. #define PSI_KILLACTIVE      0x0002
  1986. #define PSI_APPLY           0x0003
  1987. #define PSI_RESET           0x0004
  1988. #define PSI_HASHELP         0x0005
  1989. #define PSI_HELP            0x0006
  1990.  
  1991. #define PSI_CHANGED         0x0001
  1992. #define PSI_GUISTART        0x0002
  1993. #define PSI_REBOOT          0x0003
  1994. #define PSI_GETSIBLINGS     0x0004
  1995.  
  1996. //
  1997. // Returned in HIWORD() of DM_GETDEFID result if msg is supported
  1998. //
  1999. #define DC_HASDEFID         0x534B
  2000.  
  2001. //
  2002. // Dialog Codes
  2003. //
  2004. #define DLGC_WANTARROWS     0x0001      /* Control wants arrow keys         */
  2005. #define DLGC_WANTTAB        0x0002      /* Control wants tab keys           */
  2006. #define DLGC_WANTALLKEYS    0x0004      /* Control wants all keys           */
  2007. #define DLGC_WANTMESSAGE    0x0004      /* Pass message to control          */
  2008. #define DLGC_HASSETSEL      0x0008      /* Understands EM_SETSEL message    */
  2009. #define DLGC_DEFPUSHBUTTON  0x0010      /* Default pushbutton               */
  2010. #define DLGC_UNDEFPUSHBUTTON 0x0020     /* Non-default pushbutton           */
  2011. #define DLGC_RADIOBUTTON    0x0040      /* Radio button                     */
  2012. #define DLGC_WANTCHARS      0x0080      /* Want WM_CHAR messages            */
  2013. #define DLGC_STATIC         0x0100      /* Static item: don't include       */
  2014. #define DLGC_BUTTON         0x2000      /* Button item: can be checked      */
  2015.  
  2016. #define LB_CTLCODE          0
  2017.  
  2018. //
  2019. // Listbox Return Values
  2020. //
  2021. #define LB_OKAY             0
  2022. #define LB_ERR              (-1)
  2023. #define LB_ERRSPACE         (-2)
  2024.  
  2025. //
  2026. //  The idStaticPath parameter to DlgDirList can have the following values
  2027. //  ORed if the list box should show other details of the files along with
  2028. //  the name of the files;
  2029. //
  2030. //  all other details also will be returned 
  2031. //
  2032. //
  2033. // Listbox Notification Codes
  2034. //
  2035. #define LBN_ERRSPACE        (-2)
  2036. #define LBN_SELCHANGE       1
  2037. #define LBN_DBLCLK          2
  2038. #define LBN_SELCANCEL       3
  2039. #define LBN_SETFOCUS        4
  2040. #define LBN_KILLFOCUS       5
  2041.  
  2042. #ifndef WIN32API_NOMESSAGES
  2043.  
  2044. //
  2045. // Listbox messages
  2046. //
  2047. #define LB_ADDSTRING            0x0180
  2048. #define LB_INSERTSTRING         0x0181
  2049. #define LB_DELETESTRING         0x0182
  2050. #define LB_SELITEMRANGEEX       0x0183
  2051. #define LB_RESETCONTENT         0x0184
  2052. #define LB_SETSEL               0x0185
  2053. #define LB_SETCURSEL            0x0186
  2054. #define LB_GETSEL               0x0187
  2055. #define LB_GETCURSEL            0x0188
  2056. #define LB_GETTEXT              0x0189
  2057. #define LB_GETTEXTLEN           0x018A
  2058. #define LB_GETCOUNT             0x018B
  2059. #define LB_SELECTSTRING         0x018C
  2060. #define LB_DIR                  0x018D
  2061. #define LB_GETTOPINDEX          0x018E
  2062. #define LB_FINDSTRING           0x018F
  2063. #define LB_GETSELCOUNT          0x0190
  2064. #define LB_GETSELITEMS          0x0191
  2065. #define LB_SETTABSTOPS          0x0192
  2066. #define LB_GETHORIZONTALEXTENT  0x0193
  2067. #define LB_SETHORIZONTALEXTENT  0x0194
  2068. #define LB_SETCOLUMNWIDTH       0x0195
  2069. #define LB_ADDFILE              0x0196
  2070. #define LB_SETTOPINDEX          0x0197
  2071. #define LB_GETITEMRECT          0x0198
  2072. #define LB_GETITEMDATA          0x0199
  2073. #define LB_SETITEMDATA          0x019A
  2074. #define LB_SELITEMRANGE         0x019B
  2075. #define LB_SETANCHORINDEX       0x019C
  2076. #define LB_GETANCHORINDEX       0x019D
  2077. #define LB_SETCARETINDEX        0x019E
  2078. #define LB_GETCARETINDEX        0x019F
  2079. #define LB_SETITEMHEIGHT        0x01A0
  2080. #define LB_GETITEMHEIGHT        0x01A1
  2081. #define LB_FINDSTRINGEXACT      0x01A2
  2082. #define LB_SETLOCALE            0x01A5
  2083. #define LB_GETLOCALE            0x01A6
  2084. #define LB_SETCOUNT             0x01A7
  2085.  
  2086. #define LB_INITSTORAGE          0x01A8
  2087. #define LB_ITEMFROMPOINT        0x01A9
  2088. #define LB_MSGMAX               0x01B0
  2089.  
  2090. #endif // WIN32API_NOMESSAGES
  2091.  
  2092. //
  2093. // Listbox Styles
  2094. //
  2095. #define LBS_NOTIFY            0x0001
  2096. #define LBS_SORT              0x0002
  2097. #define LBS_NOREDRAW          0x0004
  2098. #define LBS_MULTIPLESEL       0x0008
  2099. #define LBS_OWNERDRAWFIXED    0x0010
  2100. #define LBS_OWNERDRAWVARIABLE 0x0020
  2101. #define LBS_HASSTRINGS        0x0040
  2102. #define LBS_USETABSTOPS       0x0080
  2103. #define LBS_NOINTEGRALHEIGHT  0x0100
  2104. #define LBS_MULTICOLUMN       0x0200
  2105. #define LBS_WANTKEYBOARDINPUT 0x0400
  2106. #define LBS_EXTENDEDSEL       0x0800
  2107. #define LBS_DISABLENOSCROLL   0x1000
  2108. #define LBS_NODATA            0x2000
  2109.  
  2110. #define LBS_NOSEL             0x4000
  2111. #define LBS_STANDARD          (bitor(bitor(bitor(LBS_NOTIFY, LBS_SORT), WS_VSCROLL), WS_BORDER))
  2112.  
  2113. //
  2114. // Combo Box return Values
  2115. //
  2116. #define CB_OKAY             0
  2117. #define CB_ERR              (-1)
  2118. #define CB_ERRSPACE         (-2)
  2119.  
  2120. //
  2121. // Combo Box Notification Codes
  2122. //
  2123. #define CBN_ERRSPACE        (-1)
  2124. #define CBN_SELCHANGE       1
  2125. #define CBN_DBLCLK          2
  2126. #define CBN_SETFOCUS        3
  2127. #define CBN_KILLFOCUS       4
  2128. #define CBN_EDITCHANGE      5
  2129. #define CBN_EDITUPDATE      6
  2130. #define CBN_DROPDOWN        7
  2131. #define CBN_CLOSEUP         8
  2132. #define CBN_SELENDOK        9
  2133. #define CBN_SELENDCANCEL    10
  2134.  
  2135. //
  2136. // Combo Box styles
  2137. //
  2138. #define CBS_SIMPLE            0x0001
  2139. #define CBS_DROPDOWN          0x0002
  2140. #define CBS_DROPDOWNLIST      0x0003
  2141. #define CBS_OWNERDRAWFIXED    0x0010
  2142. #define CBS_OWNERDRAWVARIABLE 0x0020
  2143. #define CBS_AUTOHSCROLL       0x0040
  2144. #define CBS_OEMCONVERT        0x0080
  2145. #define CBS_SORT              0x0100
  2146. #define CBS_HASSTRINGS        0x0200
  2147. #define CBS_NOINTEGRALHEIGHT  0x0400
  2148. #define CBS_DISABLENOSCROLL   0x0800
  2149.  
  2150. #define CBS_UPPERCASE           0x2000
  2151. #define CBS_LOWERCASE           0x4000
  2152.  
  2153. #ifndef WIN32API_NOMESSAGES
  2154.  
  2155. //
  2156. // Combo Box messages
  2157. //
  2158. #define CB_GETEDITSEL               0x0140
  2159. #define CB_LIMITTEXT                0x0141
  2160. #define CB_SETEDITSEL               0x0142
  2161. #define CB_ADDSTRING                0x0143
  2162. #define CB_DELETESTRING             0x0144
  2163. #define CB_DIR                      0x0145
  2164. #define CB_GETCOUNT                 0x0146
  2165. #define CB_GETCURSEL                0x0147
  2166. #define CB_GETLBTEXT                0x0148
  2167. #define CB_GETLBTEXTLEN             0x0149
  2168. #define CB_INSERTSTRING             0x014A
  2169. #define CB_RESETCONTENT             0x014B
  2170. #define CB_FINDSTRING               0x014C
  2171. #define CB_SELECTSTRING             0x014D
  2172. #define CB_SETCURSEL                0x014E
  2173. #define CB_SHOWDROPDOWN             0x014F
  2174. #define CB_GETITEMDATA              0x0150
  2175. #define CB_SETITEMDATA              0x0151
  2176. #define CB_GETDROPPEDCONTROLRECT    0x0152
  2177. #define CB_SETITEMHEIGHT            0x0153
  2178. #define CB_GETITEMHEIGHT            0x0154
  2179. #define CB_SETEXTENDEDUI            0x0155
  2180. #define CB_GETEXTENDEDUI            0x0156
  2181. #define CB_GETDROPPEDSTATE          0x0157
  2182. #define CB_FINDSTRINGEXACT          0x0158
  2183. #define CB_SETLOCALE                0x0159
  2184. #define CB_GETLOCALE                0x015A
  2185.  
  2186. #define CB_GETTOPINDEX              0x015B
  2187. #define CB_SETTOPINDEX              0x015C
  2188. #define CB_GETHORIZONTALEXTENT      0x015D
  2189. #define CB_SETHORIZONTALEXTENT      0x015E
  2190. #define CB_GETDROPPEDWIDTH          0x015F
  2191. #define CB_SETDROPPEDWIDTH          0x0160
  2192. #define CB_INITSTORAGE              0x0161
  2193. #define CB_MSGMAX                   0x0162
  2194.  
  2195. #endif // WIN32API_NOMESSAGES
  2196.  
  2197. //
  2198. // Scroll Bar Styles
  2199. //
  2200. #define SBS_HORZ                    0x0000
  2201. #define SBS_VERT                    0x0001
  2202. #define SBS_TOPALIGN                0x0002
  2203. #define SBS_LEFTALIGN               0x0002
  2204. #define SBS_BOTTOMALIGN             0x0004
  2205. #define SBS_RIGHTALIGN              0x0004
  2206. #define SBS_SIZEBOXTOPLEFTALIGN     0x0002
  2207. #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004
  2208. #define SBS_SIZEBOX                 0x0008
  2209.  
  2210. #define SBS_SIZEGRIP                0x0010
  2211.  
  2212. #ifndef WIN32API_NOMESSAGES
  2213.  
  2214. //
  2215. // Scroll bar messages
  2216. //
  2217. #define SBM_SETPOS                  0x00E0 /*not in win3.1 */
  2218. #define SBM_GETPOS                  0x00E1 /*not in win3.1 */
  2219. #define SBM_SETRANGE                0x00E2 /*not in win3.1 */
  2220. #define SBM_SETRANGEREDRAW          0x00E6 /*not in win3.1 */
  2221. #define SBM_GETRANGE                0x00E3 /*not in win3.1 */
  2222. #define SBM_ENABLE_ARROWS           0x00E4 /*not in win3.1 */
  2223.  
  2224. #define SBM_SETSCROLLINFO           0x00E9
  2225. #define SBM_GETSCROLLINFO           0x00EA
  2226.  
  2227. #define SIF_RANGE           0x0001
  2228. #define SIF_PAGE            0x0002
  2229. #define SIF_POS             0x0004
  2230. #define SIF_DISABLENOSCROLL 0x0008
  2231. #define SIF_TRACKPOS        0x0010
  2232. #define SIF_ALL             (bitor(bitor(bitor(SIF_RANGE, SIF_PAGE), SIF_POS), SIF_TRACKPOS))
  2233.  
  2234. //
  2235. // wParam Flags for WM_MDITILE and WM_MDICASCADE messages.
  2236. //
  2237. #define MDITILE_VERTICAL       0x0000 /*not in win3.1 */
  2238. #define MDITILE_HORIZONTAL     0x0001 /*not in win3.1 */
  2239. #define MDITILE_SKIPDISABLED   0x0002 /*not in win3.1 */
  2240.  
  2241. //
  2242. //  IME class support
  2243. //
  2244.  
  2245. // wParam for WM_IME_CONTROL
  2246. #define IMC_GETCANDIDATEPOS             0x0007
  2247. #define IMC_SETCANDIDATEPOS             0x0008
  2248. #define IMC_GETCOMPOSITIONFONT          0x0009
  2249. #define IMC_SETCOMPOSITIONFONT          0x000A
  2250. #define IMC_GETCOMPOSITIONWINDOW        0x000B
  2251. #define IMC_SETCOMPOSITIONWINDOW        0x000C
  2252. #define IMC_GETSTATUSWINDOWPOS          0x000F
  2253. #define IMC_SETSTATUSWINDOWPOS          0x0010
  2254. #define IMC_CLOSESTATUSWINDOW           0x0021
  2255. #define IMC_OPENSTATUSWINDOW            0x0022
  2256.  
  2257. // wParam of report message WM_IME_NOTIFY
  2258. #define IMN_CLOSESTATUSWINDOW      0x0001
  2259. #define IMN_OPENSTATUSWINDOW       0x0002
  2260. #define IMN_CHANGECANDIDATE        0x0003
  2261. #define IMN_CLOSECANDIDATE         0x0004
  2262. #define IMN_OPENCANDIDATE          0x0005
  2263. #define IMN_SETCONVERSIONMODE      0x0006
  2264. #define IMN_SETSENTENCEMODE        0x0007
  2265. #define IMN_SETOPENSTATUS          0x0008
  2266. #define IMN_SETCANDIDATEPOS        0x0009
  2267. #define IMN_SETCOMPOSITIONFONT     0x000A
  2268. #define IMN_SETCOMPOSITIONWINDOW   0x000B
  2269. #define IMN_SETSTATUSWINDOWPOS     0x000C
  2270. #define IMN_GUIDELINE              0x000D
  2271. #define IMN_PRIVATE                0x000E
  2272.  
  2273. #endif // WIN32API_NOMESSAGES
  2274.  
  2275. //
  2276. // Help support
  2277. //
  2278. //
  2279. // Commands to pass to WinHelp()
  2280. //
  2281. #define HELP_CONTEXT      0x0001  /* Display topic in ulTopic */
  2282. #define HELP_QUIT         0x0002  /* Terminate help */
  2283. #define HELP_INDEX        0x0003  /* Display index */
  2284. #define HELP_CONTENTS     0x0003
  2285. #define HELP_HELPONHELP   0x0004  /* Display help on using help */
  2286. #define HELP_SETINDEX     0x0005  /* Set current Index for multi index help */
  2287. #define HELP_SETCONTENTS  0x0005
  2288. #define HELP_CONTEXTPOPUP 0x0008
  2289. #define HELP_FORCEFILE    0x0009
  2290. #define HELP_KEY          0x0101  /* Display topic for keyword in offabData */
  2291. #define HELP_COMMAND      0x0102
  2292. #define HELP_PARTIALKEY   0x0105
  2293. #define HELP_MULTIKEY     0x0201
  2294. #define HELP_SETWINPOS    0x0203
  2295.  
  2296. #define HELP_CONTEXTMENU  0x000A
  2297. #define HELP_FINDER       0x000B
  2298. #define HELP_WM_HELP      0x000C
  2299. #define HELP_SETPOPUP_POS 0x000D
  2300.  
  2301. #define HELP_TCARD              0x8000
  2302. #define HELP_TCARD_DATA         0x0010
  2303. #define HELP_TCARD_OTHER_CALLER 0x0011
  2304.  
  2305. // These are in winhelp.h in Win95.
  2306. #define IDH_NO_HELP                     28440
  2307. #define IDH_MISSING_CONTEXT             28441 // Control doesn't have matching help context
  2308. #define IDH_GENERIC_HELP_BUTTON         28442 // Property sheet help button
  2309. #define IDH_OK                          28443
  2310. #define IDH_CANCEL                      28444
  2311. #define IDH_HELP                        28445
  2312.  
  2313. //
  2314. // Parameter for SystemParametersInfo()
  2315. //
  2316.  
  2317. #define SPI_GETBEEP                 1
  2318. #define SPI_SETBEEP                 2
  2319. #define SPI_GETMOUSE                3
  2320. #define SPI_SETMOUSE                4
  2321. #define SPI_GETBORDER               5
  2322. #define SPI_SETBORDER               6
  2323. #define SPI_GETKEYBOARDSPEED       10
  2324. #define SPI_SETKEYBOARDSPEED       11
  2325. #define SPI_LANGDRIVER             12
  2326. #define SPI_ICONHORIZONTALSPACING  13
  2327. #define SPI_GETSCREENSAVETIMEOUT   14
  2328. #define SPI_SETSCREENSAVETIMEOUT   15
  2329. #define SPI_GETSCREENSAVEACTIVE    16
  2330. #define SPI_SETSCREENSAVEACTIVE    17
  2331. #define SPI_GETGRIDGRANULARITY     18
  2332. #define SPI_SETGRIDGRANULARITY     19
  2333. #define SPI_SETDESKWALLPAPER       20
  2334. #define SPI_SETDESKPATTERN         21
  2335. #define SPI_GETKEYBOARDDELAY       22
  2336. #define SPI_SETKEYBOARDDELAY       23
  2337. #define SPI_ICONVERTICALSPACING    24
  2338. #define SPI_GETICONTITLEWRAP       25
  2339. #define SPI_SETICONTITLEWRAP       26
  2340. #define SPI_GETMENUDROPALIGNMENT   27
  2341. #define SPI_SETMENUDROPALIGNMENT   28
  2342. #define SPI_SETDOUBLECLKWIDTH      29
  2343. #define SPI_SETDOUBLECLKHEIGHT     30
  2344. #define SPI_GETICONTITLELOGFONT    31
  2345. #define SPI_SETDOUBLECLICKTIME     32
  2346. #define SPI_SETMOUSEBUTTONSWAP     33
  2347. #define SPI_SETICONTITLELOGFONT    34
  2348. #define SPI_GETFASTTASKSWITCH      35
  2349. #define SPI_SETFASTTASKSWITCH      36
  2350.  
  2351. #define SPI_SETDRAGFULLWINDOWS     37
  2352. #define SPI_GETDRAGFULLWINDOWS     38
  2353. #define SPI_GETNONCLIENTMETRICS    41
  2354. #define SPI_SETNONCLIENTMETRICS    42
  2355. #define SPI_GETMINIMIZEDMETRICS    43
  2356. #define SPI_SETMINIMIZEDMETRICS    44
  2357. #define SPI_GETICONMETRICS         45
  2358. #define SPI_SETICONMETRICS         46
  2359. #define SPI_SETWORKAREA            47
  2360. #define SPI_GETWORKAREA            48
  2361. #define SPI_SETPENWINDOWS          49
  2362.  
  2363. #define SPI_GETHIGHCONTRAST        66
  2364. #define SPI_SETHIGHCONTRAST        67
  2365. #define SPI_GETKEYBOARDPREF        68
  2366. #define SPI_SETKEYBOARDPREF        69
  2367. #define SPI_GETSCREENREADER        70
  2368. #define SPI_SETSCREENREADER        71
  2369. #define SPI_GETANIMATION           72
  2370. #define SPI_SETANIMATION           73
  2371. #define SPI_GETFONTSMOOTHING       74
  2372. #define SPI_SETFONTSMOOTHING       75
  2373. #define SPI_SETDRAGWIDTH           76
  2374. #define SPI_SETDRAGHEIGHT          77
  2375. #define SPI_SETHANDHELD            78
  2376. #define SPI_GETLOWPOWERTIMEOUT     79
  2377. #define SPI_GETPOWEROFFTIMEOUT     80
  2378. #define SPI_SETLOWPOWERTIMEOUT     81
  2379. #define SPI_SETPOWEROFFTIMEOUT     82
  2380. #define SPI_GETLOWPOWERACTIVE      83
  2381. #define SPI_GETPOWEROFFACTIVE      84
  2382. #define SPI_SETLOWPOWERACTIVE      85
  2383. #define SPI_SETPOWEROFFACTIVE      86
  2384. #define SPI_SETCURSORS             87
  2385. #define SPI_SETICONS               88
  2386. #define SPI_GETDEFAULTINPUTLANG    89
  2387. #define SPI_SETDEFAULTINPUTLANG    90
  2388. #define SPI_SETLANGTOGGLE          91
  2389. #define SPI_GETWINDOWSEXTENSION    92
  2390. #define SPI_SETMOUSETRAILS         93
  2391. #define SPI_GETMOUSETRAILS         94
  2392. #define SPI_SCREENSAVERRUNNING     97
  2393.  
  2394. #define SPI_GETFILTERKEYS          50
  2395. #define SPI_SETFILTERKEYS          51
  2396. #define SPI_GETTOGGLEKEYS          52
  2397. #define SPI_SETTOGGLEKEYS          53
  2398. #define SPI_GETMOUSEKEYS           54
  2399. #define SPI_SETMOUSEKEYS           55
  2400. #define SPI_GETSHOWSOUNDS          56
  2401. #define SPI_SETSHOWSOUNDS          57
  2402. #define SPI_GETSTICKYKEYS          58
  2403. #define SPI_SETSTICKYKEYS          59
  2404. #define SPI_GETACCESSTIMEOUT       60
  2405. #define SPI_SETACCESSTIMEOUT       61
  2406.  
  2407. #define SPI_GETSERIALKEYS          62
  2408. #define SPI_SETSERIALKEYS          63
  2409.  
  2410. #define SPI_GETSOUNDSENTRY         64
  2411. #define SPI_SETSOUNDSENTRY         65
  2412.  
  2413. //
  2414. // Flags
  2415. //
  2416. #define SPIF_UPDATEINIFILE    0x0001
  2417. #define SPIF_SENDWININICHANGE 0x0002
  2418. #define SPIF_SENDCHANGE       SPIF_SENDWININICHANGE
  2419.  
  2420. #define METRICS_USEDEFAULT -1
  2421.  
  2422. #define ARW_BOTTOMLEFT              0x0000
  2423. #define ARW_BOTTOMRIGHT             0x0001
  2424. #define ARW_TOPLEFT                 0x0002
  2425. #define ARW_TOPRIGHT                0x0003
  2426. #define ARW_STARTMASK               0x0003
  2427. #define ARW_STARTRIGHT              0x0001
  2428. #define ARW_STARTTOP                0x0002
  2429.  
  2430. #define ARW_LEFT                    0x0000
  2431. #define ARW_RIGHT                   0x0000
  2432. #define ARW_UP                      0x0004
  2433. #define ARW_DOWN                    0x0004
  2434. #define ARW_HIDE                    0x0008
  2435. #define ARW_VALID                   0x000F
  2436.  
  2437. // flags for SERIALKEYS dwFlags field
  2438. #define SERKF_SERIALKEYSON  0x00000001
  2439. #define SERKF_AVAILABLE     0x00000002
  2440. #define SERKF_INDICATOR     0x00000004
  2441.  
  2442. // flags for HIGHCONTRAST dwFlags field
  2443. #define HCF_HIGHCONTRASTON  0x00000001
  2444. #define HCF_AVAILABLE       0x00000002
  2445. #define HCF_HOTKEYACTIVE    0x00000004
  2446. #define HCF_CONFIRMHOTKEY   0x00000008
  2447. #define HCF_HOTKEYSOUND     0x00000010
  2448. #define HCF_INDICATOR       0x00000020
  2449. #define HCF_HOTKEYAVAILABLE 0x00000040
  2450.  
  2451. // Flags for ChangeDisplaySettings
  2452. #define CDS_UPDATEREGISTRY  0x00000001
  2453. #define CDS_TEST            0x00000002
  2454. #define CDS_FULLSCREEN      0x00000004
  2455.  
  2456. // Return values
  2457. #define DISP_CHANGE_SUCCESSFUL       0
  2458. #define DISP_CHANGE_RESTART          1
  2459. #define DISP_CHANGE_FAILED          -1
  2460. #define DISP_CHANGE_BADMODE         -2
  2461. #define DISP_CHANGE_NOTUPDATED      -3
  2462. #define DISP_CHANGE_BADFLAGS        -4
  2463.  
  2464. //
  2465. // FILTERKEYS dwFlags field
  2466. //
  2467. #define FKF_FILTERKEYSON    0x00000001
  2468. #define FKF_AVAILABLE       0x00000002
  2469. #define FKF_HOTKEYACTIVE    0x00000004
  2470. #define FKF_CONFIRMHOTKEY   0x00000008
  2471. #define FKF_HOTKEYSOUND     0x00000010
  2472. #define FKF_INDICATOR       0x00000020
  2473. #define FKF_CLICKON         0x00000040
  2474.  
  2475. //
  2476. // STICKYKEYS dwFlags field
  2477. //
  2478. #define SKF_STICKYKEYSON    0x00000001
  2479. #define SKF_AVAILABLE       0x00000002
  2480. #define SKF_HOTKEYACTIVE    0x00000004
  2481. #define SKF_CONFIRMHOTKEY   0x00000008
  2482. #define SKF_HOTKEYSOUND     0x00000010
  2483. #define SKF_INDICATOR       0x00000020
  2484. #define SKF_AUDIBLEFEEDBACK 0x00000040
  2485. #define SKF_TRISTATE        0x00000080
  2486. #define SKF_TWOKEYSOFF      0x00000100
  2487.  
  2488. //
  2489. // MOUSEKEYS dwFlags field
  2490. //
  2491. #define MKF_MOUSEKEYSON     0x00000001
  2492. #define MKF_AVAILABLE       0x00000002
  2493. #define MKF_HOTKEYACTIVE    0x00000004
  2494. #define MKF_CONFIRMHOTKEY   0x00000008
  2495. #define MKF_HOTKEYSOUND     0x00000010
  2496. #define MKF_INDICATOR       0x00000020
  2497. #define MKF_MODIFIERS       0x00000040
  2498. #define MKF_REPLACENUMBERS  0x00000080
  2499.  
  2500. //
  2501. // ACCESSTIMEOUT dwFlags field
  2502. //
  2503. #define ATF_TIMEOUTON       0x00000001
  2504. #define ATF_ONOFFFEEDBACK   0x00000002
  2505.  
  2506. // values for SOUNDSENTRY iFSGrafEffect field
  2507. #define SSGF_NONE       0
  2508. #define SSGF_DISPLAY    3
  2509.  
  2510. // values for SOUNDSENTRY iFSTextEffect field
  2511. #define SSTF_NONE       0
  2512. #define SSTF_CHARS      1
  2513. #define SSTF_BORDER     2
  2514. #define SSTF_DISPLAY    3
  2515.  
  2516. // values for SOUNDSENTRY iWindowsEffect field
  2517. #define SSWF_NONE     0
  2518. #define SSWF_TITLE    1
  2519. #define SSWF_WINDOW   2
  2520. #define SSWF_DISPLAY  3
  2521. #define SSWF_CUSTOM   4
  2522.  
  2523. //
  2524. // SOUNDSENTRY dwFlags field
  2525. //
  2526. #define SSF_SOUNDSENTRYON   0x00000001
  2527. #define SSF_AVAILABLE       0x00000002
  2528. #define SSF_INDICATOR       0x00000004
  2529.  
  2530. //
  2531. // TOGGLEKEYS dwFlags field
  2532. //
  2533. #define TKF_TOGGLEKEYSON    0x00000001
  2534. #define TKF_AVAILABLE       0x00000002
  2535. #define TKF_HOTKEYACTIVE    0x00000004
  2536. #define TKF_CONFIRMHOTKEY   0x00000008
  2537. #define TKF_HOTKEYSOUND     0x00000010
  2538. #define TKF_INDICATOR       0x00000020
  2539.  
  2540. //
  2541. // SetLastErrorEx() types.
  2542. //
  2543.  
  2544. #define SLE_ERROR       0x00000001
  2545. #define SLE_MINORERROR  0x00000002
  2546. #define SLE_WARNING     0x00000003
  2547.  
  2548. #endif  // WINUSER_H
  2549.